Verified Commit 5d13f0e4 authored by likewhoa's avatar likewhoa
Browse files

Remove prompt for indexer on initial install and add --auto flag to dojo install

parent 8acbfb7c
......@@ -225,9 +225,15 @@ fi
_check_indexer
if (($?==2)); then # No indexer, fresh install so show prompts for indexer selection
_indexer_prompt
# give user menu for install choices, see functions.sh
if (($?==2)); then
# No indexer found, fresh install
# Enable default samourai indexer unless dojo_indexer="electrs-indexer" set in user.conf
_set_indexer
# Enable Electrs indexer
if [ "${dojo_indexer}" = "electrs-indexer" ]; then
bash "$HOME"/RoninDojo/Scripts/Install/install-electrs-indexer.sh
fi
fi
cat <<EOF
......@@ -262,7 +268,7 @@ sudo systemctl restart --quiet docker
cd "$dojo_path_my_dojo" || exit
if ./dojo.sh install --nolog; then
if ./dojo.sh install --nolog --auto; then
cat <<EOF
${red}
***
......
......@@ -1055,131 +1055,6 @@ _check_indexer() {
return 2 # No indexer
}
#
# No indexer was found so offer user choice of SW indexer, electrs, or none
#
_indexer_prompt() {
. "$HOME"/RoninDojo/Scripts/defaults.sh
cat <<EOF
${red}
***
No Indexer found...
***
${nc}
EOF
_sleep
cat <<EOF
${red}
***
Preparing for Indexer Prompt...
***
${nc}
EOF
_sleep
cat <<EOF
${red}
***
Samourai Indexer is recommended for most users as it helps with querying balances...
***
${nc}
EOF
_sleep 3
cat <<EOF
${red}
***
Electrum Rust Server is recommended for Hardware Wallets, Multisig, and other Electrum features...
***
${nc}
EOF
_sleep 3
cat <<EOF
${red}
***
Skipping the installation of either Indexer option is ok! You can always enable later...
***
${nc}
EOF
_sleep 3
cat <<EOF
${red}
***
Choose one of the following options for your Indexer...
***
${nc}
EOF
_sleep
# indexer names here are used as data source
while true; do
select indexer in "Samourai Indexer (recommended)" "Electrum Rust Server" "No Indexer (not recommended)"; do
case $indexer in
"Samourai Indexer"*)
cat <<EOF
${red}
***
Selected Samourai Indexer...
***
${nc}
EOF
_sleep
_check_indexer && _uninstall_electrs_indexer
_set_indexer
return 0
;;
# Samourai indexer install enabled in .conf.tpl files using sed
"Electrum"*)
cat <<EOF
${red}
***
Selected Electrum Rust Server...
***
${nc}
EOF
_sleep
_set_indexer
bash "$HOME"/RoninDojo/Scripts/Install/install-electrs-indexer.sh
return 0
;;
# triggers electrs install script
"No Indexer"*)
cat <<EOF
${red}
***
An Indexer will not be installed...
***
${nc}
EOF
_sleep
return 0
;;
# indexer will not be installed
*)
cat <<EOF
${red}
***
Invalid Entry! Valid values are 1, 2 & 3...
***
${nc}
EOF
_sleep
break
;;
# invalid data try again
esac
done
done
}
#
# Check if my-dojo directory is missing
#
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment