mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-26 19:47:05 +02:00
adjust exit codes in menu scripts
This commit is contained in:
@@ -37,10 +37,10 @@ clear
|
|||||||
echo "dialogcancel(${dialogcancel})"
|
echo "dialogcancel(${dialogcancel})"
|
||||||
if [ ${dialogcancel} -eq 1 ]; then
|
if [ ${dialogcancel} -eq 1 ]; then
|
||||||
echo "user canceled"
|
echo "user canceled"
|
||||||
exit 1
|
exit 0
|
||||||
elif [ ${dialogcancel} -eq 255 ]; then
|
elif [ ${dialogcancel} -eq 255 ]; then
|
||||||
echo "ESC pressed"
|
echo "ESC pressed"
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
needsReboot=0
|
needsReboot=0
|
||||||
|
@@ -37,10 +37,10 @@ clear
|
|||||||
echo "dialogcancel(${dialogcancel})"
|
echo "dialogcancel(${dialogcancel})"
|
||||||
if [ ${dialogcancel} -eq 1 ]; then
|
if [ ${dialogcancel} -eq 1 ]; then
|
||||||
echo "user canceled"
|
echo "user canceled"
|
||||||
exit 1
|
exit 0
|
||||||
elif [ ${dialogcancel} -eq 255 ]; then
|
elif [ ${dialogcancel} -eq 255 ]; then
|
||||||
echo "ESC pressed"
|
echo "ESC pressed"
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
needsReboot=0
|
needsReboot=0
|
||||||
|
@@ -117,10 +117,10 @@ clear
|
|||||||
echo "dialogcancel(${dialogcancel})"
|
echo "dialogcancel(${dialogcancel})"
|
||||||
if [ ${dialogcancel} -eq 1 ]; then
|
if [ ${dialogcancel} -eq 1 ]; then
|
||||||
echo "user canceled"
|
echo "user canceled"
|
||||||
exit 1
|
exit 0
|
||||||
elif [ ${dialogcancel} -eq 255 ]; then
|
elif [ ${dialogcancel} -eq 255 ]; then
|
||||||
echo "ESC pressed"
|
echo "ESC pressed"
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
needsReboot=0
|
needsReboot=0
|
||||||
|
@@ -60,10 +60,10 @@ clear
|
|||||||
echo "dialogcancel(${dialogcancel})"
|
echo "dialogcancel(${dialogcancel})"
|
||||||
if [ ${dialogcancel} -eq 1 ]; then
|
if [ ${dialogcancel} -eq 1 ]; then
|
||||||
echo "user canceled"
|
echo "user canceled"
|
||||||
exit 1
|
exit 0
|
||||||
elif [ ${dialogcancel} -eq 255 ]; then
|
elif [ ${dialogcancel} -eq 255 ]; then
|
||||||
echo "ESC pressed"
|
echo "ESC pressed"
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
needsReboot=0
|
needsReboot=0
|
||||||
|
@@ -155,7 +155,7 @@ clear
|
|||||||
echo "creating install info ..."
|
echo "creating install info ..."
|
||||||
case $CHOICE in
|
case $CHOICE in
|
||||||
CLOSE)
|
CLOSE)
|
||||||
exit 1;
|
exit 0;
|
||||||
;;
|
;;
|
||||||
SPHINX)
|
SPHINX)
|
||||||
if [ "${sphinxrelay}" != "on" ]; then
|
if [ "${sphinxrelay}" != "on" ]; then
|
||||||
@@ -173,7 +173,7 @@ case $CHOICE in
|
|||||||
fi
|
fi
|
||||||
# make pairing thru sphinx relay script
|
# make pairing thru sphinx relay script
|
||||||
/home/admin/config.scripts/bonus.sphinxrelay.sh menu
|
/home/admin/config.scripts/bonus.sphinxrelay.sh menu
|
||||||
exit 1;
|
exit 0;
|
||||||
;;
|
;;
|
||||||
ZAP_IOS)
|
ZAP_IOS)
|
||||||
appstoreLink="https://apps.apple.com/us/app/zap-bitcoin-lightning-wallet/id1406311960"
|
appstoreLink="https://apps.apple.com/us/app/zap-bitcoin-lightning-wallet/id1406311960"
|
||||||
@@ -206,7 +206,7 @@ Or scan the qr code on the LCD with your mobile phone.
|
|||||||
choose_IP_or_TOR
|
choose_IP_or_TOR
|
||||||
fi
|
fi
|
||||||
/home/admin/config.scripts/bonus.lndconnect.sh zap-ios ${connect}
|
/home/admin/config.scripts/bonus.lndconnect.sh zap-ios ${connect}
|
||||||
exit 1;
|
exit 0;
|
||||||
;;
|
;;
|
||||||
ZAP_ANDROID)
|
ZAP_ANDROID)
|
||||||
appstoreLink="https://play.google.com/store/apps/details?id=zapsolutions.zap"
|
appstoreLink="https://play.google.com/store/apps/details?id=zapsolutions.zap"
|
||||||
@@ -229,7 +229,7 @@ Or scan the qr code on the LCD with your mobile phone.
|
|||||||
choose_IP_or_TOR
|
choose_IP_or_TOR
|
||||||
fi
|
fi
|
||||||
/home/admin/config.scripts/bonus.lndconnect.sh zap-android ${connect}
|
/home/admin/config.scripts/bonus.lndconnect.sh zap-android ${connect}
|
||||||
exit 1;
|
exit 0;
|
||||||
;;
|
;;
|
||||||
SENDMANY_ANDROID)
|
SENDMANY_ANDROID)
|
||||||
|
|
||||||
@@ -241,7 +241,7 @@ To use the chat feature of the SendMany app, you need to activate the Keysend fe
|
|||||||
|
|
||||||
Please go to MAINMENU > SERVICES and activate KEYSEND first.
|
Please go to MAINMENU > SERVICES and activate KEYSEND first.
|
||||||
" 12 65
|
" 12 65
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
appstoreLink="https://github.com/fusion44/sendmany/releases"
|
appstoreLink="https://github.com/fusion44/sendmany/releases"
|
||||||
@@ -256,7 +256,7 @@ Please go to MAINMENU > SERVICES and activate KEYSEND first.
|
|||||||
/home/admin/config.scripts/blitz.display.sh hide
|
/home/admin/config.scripts/blitz.display.sh hide
|
||||||
checkIP2TOR LND-GRPC-API
|
checkIP2TOR LND-GRPC-API
|
||||||
/home/admin/config.scripts/bonus.lndconnect.sh sendmany-android ${connect}
|
/home/admin/config.scripts/bonus.lndconnect.sh sendmany-android ${connect}
|
||||||
exit 1;
|
exit 0;
|
||||||
;;
|
;;
|
||||||
ZEUS_IOS)
|
ZEUS_IOS)
|
||||||
appstoreLink="https://testflight.apple.com/join/gpVFzEHN"
|
appstoreLink="https://testflight.apple.com/join/gpVFzEHN"
|
||||||
@@ -271,7 +271,7 @@ Please go to MAINMENU > SERVICES and activate KEYSEND first.
|
|||||||
fi
|
fi
|
||||||
/home/admin/config.scripts/blitz.display.sh hide
|
/home/admin/config.scripts/blitz.display.sh hide
|
||||||
/home/admin/config.scripts/bonus.lndconnect.sh zeus-ios tor
|
/home/admin/config.scripts/bonus.lndconnect.sh zeus-ios tor
|
||||||
exit 1;
|
exit 0;
|
||||||
;;
|
;;
|
||||||
ZEUS_ANDROID)
|
ZEUS_ANDROID)
|
||||||
appstoreLink="https://play.google.com/store/apps/details?id=app.zeusln.zeus"
|
appstoreLink="https://play.google.com/store/apps/details?id=app.zeusln.zeus"
|
||||||
@@ -290,7 +290,7 @@ Or scan the qr code on the LCD with your mobile phone.
|
|||||||
fi
|
fi
|
||||||
/home/admin/config.scripts/blitz.display.sh hide
|
/home/admin/config.scripts/blitz.display.sh hide
|
||||||
/home/admin/config.scripts/bonus.lndconnect.sh zeus-android tor
|
/home/admin/config.scripts/bonus.lndconnect.sh zeus-android tor
|
||||||
exit 1;
|
exit 0;
|
||||||
;;
|
;;
|
||||||
FULLY_NODED)
|
FULLY_NODED)
|
||||||
appstoreLink="https://apps.apple.com/us/app/fully-noded/id1436425586"
|
appstoreLink="https://apps.apple.com/us/app/fully-noded/id1436425586"
|
||||||
@@ -309,6 +309,6 @@ Or scan the qr code on the LCD with your mobile phone.
|
|||||||
fi
|
fi
|
||||||
/home/admin/config.scripts/blitz.display.sh hide
|
/home/admin/config.scripts/blitz.display.sh hide
|
||||||
/home/admin/config.scripts/bonus.fullynoded.sh
|
/home/admin/config.scripts/bonus.fullynoded.sh
|
||||||
exit 1;
|
exit 0;
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@@ -118,7 +118,7 @@ case $CHOICE in
|
|||||||
|
|
||||||
# go back to main menu (and show)
|
# go back to main menu (and show)
|
||||||
/home/admin/00raspiblitz.sh
|
/home/admin/00raspiblitz.sh
|
||||||
exit 1;
|
exit 0;
|
||||||
;;
|
;;
|
||||||
RESET-HDD)
|
RESET-HDD)
|
||||||
askBackupCopy
|
askBackupCopy
|
||||||
@@ -136,11 +136,11 @@ case $CHOICE in
|
|||||||
;;
|
;;
|
||||||
DELETE-ELEC)
|
DELETE-ELEC)
|
||||||
/home/admin/config.scripts/bonus.electrs.sh off deleteindex
|
/home/admin/config.scripts/bonus.electrs.sh off deleteindex
|
||||||
exit 1;
|
exit 0;
|
||||||
;;
|
;;
|
||||||
DELETE-INDEX)
|
DELETE-INDEX)
|
||||||
/home/admin/config.scripts/network.txindex.sh delete
|
/home/admin/config.scripts/network.txindex.sh delete
|
||||||
exit 1;
|
exit 0;
|
||||||
;;
|
;;
|
||||||
COPY-SOURCE)
|
COPY-SOURCE)
|
||||||
/home/admin/config.scripts/blitz.copychain.sh source
|
/home/admin/config.scripts/blitz.copychain.sh source
|
||||||
|
@@ -21,7 +21,7 @@ No need to close channels or download blockchain again.
|
|||||||
Do you want to start the Update now?
|
Do you want to start the Update now?
|
||||||
" 16 62
|
" 16 62
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
whiptail --title "LND Data Backup" --yes-button "Download Backup" --no-button "Skip" --yesno "
|
whiptail --title "LND Data Backup" --yes-button "Download Backup" --no-button "Skip" --yesno "
|
||||||
@@ -69,7 +69,7 @@ and do you WANT TO START UPDATE NOW?
|
|||||||
OK. RaspiBlitz will NOT update now.
|
OK. RaspiBlitz will NOT update now.
|
||||||
" 7 39
|
" 7 39
|
||||||
sudo systemctl start lnd
|
sudo systemctl start lnd
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
clear
|
clear
|
||||||
@@ -93,7 +93,7 @@ hotfix the code and might compromise your security.
|
|||||||
Do you want to Patch your RaspiBlitz now?
|
Do you want to Patch your RaspiBlitz now?
|
||||||
" 18 58
|
" 18 58
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -128,10 +128,11 @@ patch()
|
|||||||
echo "REBOOT .."
|
echo "REBOOT .."
|
||||||
/home/admin/config.scripts/blitz.shutdown.sh reboot
|
/home/admin/config.scripts/blitz.shutdown.sh reboot
|
||||||
sleep 8
|
sleep 8
|
||||||
|
exit 1
|
||||||
else
|
else
|
||||||
echo "SKIP REBOOT .."
|
echo "SKIP REBOOT .."
|
||||||
|
exit 0
|
||||||
fi
|
fi
|
||||||
exit 1
|
|
||||||
;;
|
;;
|
||||||
REPO)
|
REPO)
|
||||||
clear
|
clear
|
||||||
@@ -148,7 +149,7 @@ patch()
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
patch
|
patch
|
||||||
exit 1
|
exit 0
|
||||||
;;
|
;;
|
||||||
BRANCH)
|
BRANCH)
|
||||||
clear
|
clear
|
||||||
@@ -165,7 +166,7 @@ patch()
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
patch
|
patch
|
||||||
exit 1
|
exit 0
|
||||||
;;
|
;;
|
||||||
PR)
|
PR)
|
||||||
clear
|
clear
|
||||||
@@ -186,7 +187,7 @@ patch()
|
|||||||
/home/admin/config.scripts/blitz.github.sh -justinstall
|
/home/admin/config.scripts/blitz.github.sh -justinstall
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
exit 1
|
exit 0
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@@ -212,7 +213,7 @@ lnd()
|
|||||||
VERIFIED)
|
VERIFIED)
|
||||||
if [ ${lndUpdateInstalled} -eq 1 ]; then
|
if [ ${lndUpdateInstalled} -eq 1 ]; then
|
||||||
whiptail --title "ALREADY INSTALLED" --msgbox "The LND version ${lndUpdateVersion} is already installed." 8 30
|
whiptail --title "ALREADY INSTALLED" --msgbox "The LND version ${lndUpdateVersion} is already installed." 8 30
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
whiptail --title "OPTIONAL LND UPDATE" --yes-button "Cancel" --no-button "Update" --yesno "BEWARE on updating to LND v${lndUpdateVersion}:
|
whiptail --title "OPTIONAL LND UPDATE" --yes-button "Cancel" --no-button "Update" --yesno "BEWARE on updating to LND v${lndUpdateVersion}:
|
||||||
|
|
||||||
@@ -222,7 +223,7 @@ Do you really want to update LND now?
|
|||||||
" 16 58
|
" 16 58
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
echo "# cancel update"
|
echo "# cancel update"
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
# if loop is installed remove
|
# if loop is installed remove
|
||||||
if [ "${loop}" == "on" ]; then
|
if [ "${loop}" == "on" ]; then
|
||||||
@@ -255,7 +256,7 @@ Do you really want to update LND now?
|
|||||||
" 16 58
|
" 16 58
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
echo "# cancel update"
|
echo "# cancel update"
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
error=""
|
error=""
|
||||||
source <(sudo -u admin /home/admin/config.scripts/lnd.update.sh reckless)
|
source <(sudo -u admin /home/admin/config.scripts/lnd.update.sh reckless)
|
||||||
@@ -296,7 +297,7 @@ bitcoinUpdate() {
|
|||||||
if [ ${bitcoinUpdateInstalled} -eq 1 ]; then
|
if [ ${bitcoinUpdateInstalled} -eq 1 ]; then
|
||||||
whiptail --title "ALREADY INSTALLED" \
|
whiptail --title "ALREADY INSTALLED" \
|
||||||
--msgbox "The Bitcoin Core version ${bitcoinUpdateVersion} is already installed." 8 30
|
--msgbox "The Bitcoin Core version ${bitcoinUpdateVersion} is already installed." 8 30
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
whiptail --title "OPTIONAL Bitcoin Core update" --yes-button "Cancel" --no-button "Update" \
|
whiptail --title "OPTIONAL Bitcoin Core update" --yes-button "Cancel" --no-button "Update" \
|
||||||
--yesno "Info on updating to Bitcoin Core v${bitcoinVersion}:
|
--yesno "Info on updating to Bitcoin Core v${bitcoinVersion}:
|
||||||
@@ -308,7 +309,7 @@ Do you really want to update Bitcoin Core now?
|
|||||||
" 12 58
|
" 12 58
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
echo "# cancel update"
|
echo "# cancel update"
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
error=""
|
error=""
|
||||||
@@ -332,7 +333,7 @@ Do you really want to update Bitcoin Core now?
|
|||||||
" 16 58
|
" 16 58
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
echo "# cancel update"
|
echo "# cancel update"
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
error=""
|
error=""
|
||||||
source <(sudo -u admin /home/admin/config.scripts/bitcoin.update.sh reckless)
|
source <(sudo -u admin /home/admin/config.scripts/bitcoin.update.sh reckless)
|
||||||
|
@@ -33,13 +33,13 @@ if [ ${#openChannels} -eq 0 ]; then
|
|||||||
echo "************************************************"
|
echo "************************************************"
|
||||||
echo "Press ENTER to return to main menu."
|
echo "Press ENTER to return to main menu."
|
||||||
read key
|
read key
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ${openChannels} -gt 0 ]; then
|
if [ ${openChannels} -gt 0 ]; then
|
||||||
whiptail --title 'Info' --yes-button='Cashout Anyway' --no-button='Go Back' --yesno 'You still have funds in open Lightning Channels.\nUse CLOSEALL first if you want to cashout all funds.\nNOTICE: Just confirmed on-chain funds can be moved.' 10 56
|
whiptail --title 'Info' --yes-button='Cashout Anyway' --no-button='Go Back' --yesno 'You still have funds in open Lightning Channels.\nUse CLOSEALL first if you want to cashout all funds.\nNOTICE: Just confirmed on-chain funds can be moved.' 10 56
|
||||||
if [ $? -eq 1 ]; then
|
if [ $? -eq 1 ]; then
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
echo "..."
|
echo "..."
|
||||||
fi
|
fi
|
||||||
@@ -59,7 +59,7 @@ fi
|
|||||||
if [ ${unconfirmed} -gt 0 ]; then
|
if [ ${unconfirmed} -gt 0 ]; then
|
||||||
whiptail --title 'Info' --yes-button='Cashout Anyway' --no-button='Go Back' --yesno "Still waiting confirmation for (some of) your funds.\nNOTICE: Just confirmed on-chain funds can be moved." 8 58
|
whiptail --title 'Info' --yes-button='Cashout Anyway' --no-button='Go Back' --yesno "Still waiting confirmation for (some of) your funds.\nNOTICE: Just confirmed on-chain funds can be moved." 8 58
|
||||||
if [ $? -eq 1 ]; then
|
if [ $? -eq 1 ]; then
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
echo "..."
|
echo "..."
|
||||||
fi
|
fi
|
||||||
@@ -72,7 +72,7 @@ then
|
|||||||
echo "ok pressed"
|
echo "ok pressed"
|
||||||
else
|
else
|
||||||
echo "cancel pressed"
|
echo "cancel pressed"
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
address=$(cat $_temp | xargs)
|
address=$(cat $_temp | xargs)
|
||||||
shred -u $_temp
|
shred -u $_temp
|
||||||
@@ -80,7 +80,7 @@ if [ ${#address} -eq 0 ]; then
|
|||||||
echo "FAIL - not a valid address (${address})"
|
echo "FAIL - not a valid address (${address})"
|
||||||
echo "Press ENTER to return to main menu."
|
echo "Press ENTER to return to main menu."
|
||||||
read key
|
read key
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
clear
|
clear
|
||||||
|
@@ -34,7 +34,7 @@ elif [ $LNTYPE = lnd ];then
|
|||||||
# precheck: AutoPilot
|
# precheck: AutoPilot
|
||||||
if [ "${autoPilot}" = "on" ]; then
|
if [ "${autoPilot}" = "on" ]; then
|
||||||
dialog --title 'Info' --msgbox 'You need to turn OFF the LND AutoPilot first,\nso that closed channels are not opening up again.\nYou find the AutoPilot -----> SERVICES section' 7 55
|
dialog --title 'Info' --msgbox 'You need to turn OFF the LND AutoPilot first,\nso that closed channels are not opening up again.\nYou find the AutoPilot -----> SERVICES section' 7 55
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
command="$lncli_alias closeallchannels --force"
|
command="$lncli_alias closeallchannels --force"
|
||||||
fi
|
fi
|
||||||
@@ -62,7 +62,7 @@ if [ ${chainOutSync} -eq 1 ]; then
|
|||||||
echo
|
echo
|
||||||
echo "# PRESS ENTER to return to menu"
|
echo "# PRESS ENTER to return to menu"
|
||||||
read key
|
read key
|
||||||
exit 1
|
exit 0
|
||||||
else
|
else
|
||||||
echo "# OK - the chain is synced"
|
echo "# OK - the chain is synced"
|
||||||
fi
|
fi
|
||||||
@@ -87,6 +87,4 @@ fi
|
|||||||
|
|
||||||
echo
|
echo
|
||||||
echo "# OK - please recheck if channels really closed"
|
echo "# OK - please recheck if channels really closed"
|
||||||
sleep 5
|
sleep 5
|
||||||
|
|
||||||
#TODO exits to CLI, not returning to menu
|
|
@@ -32,7 +32,7 @@ if [ ${#_input} -eq 0 ]; then
|
|||||||
echo
|
echo
|
||||||
echo "no peer entered - returning to menu ..."
|
echo "no peer entered - returning to menu ..."
|
||||||
sleep 2
|
sleep 2
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pubkey=$(echo "${_input}"|cut -d@ -f1)
|
pubkey=$(echo "${_input}"|cut -d@ -f1)
|
||||||
|
@@ -40,7 +40,7 @@ while [ "${chainInSync}" == "0" ]; do
|
|||||||
--pause "\n\n'$lncommand getinfo' shows 'synced_to_chain': false\n\nTry again in a few seconds." 15 60 5
|
--pause "\n\n'$lncommand getinfo' shows 'synced_to_chain': false\n\nTry again in a few seconds." 15 60 5
|
||||||
|
|
||||||
if [ $? -gt 0 ]; then
|
if [ $? -gt 0 ]; then
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
chainInSync=${cmdChainInSync}
|
chainInSync=${cmdChainInSync}
|
||||||
done
|
done
|
||||||
@@ -57,8 +57,8 @@ if [ ${openChannels} -eq 0 ]; then
|
|||||||
echo "!!!!!!!!!!!!!!!!!!!"
|
echo "!!!!!!!!!!!!!!!!!!!"
|
||||||
echo "FAIL - You have NO ESTABLISHED CHANNELS .. open a channel first."
|
echo "FAIL - You have NO ESTABLISHED CHANNELS .. open a channel first."
|
||||||
echo "!!!!!!!!!!!!!!!!!!!"
|
echo "!!!!!!!!!!!!!!!!!!!"
|
||||||
echo
|
sleep 3
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# let user enter the invoice
|
# let user enter the invoice
|
||||||
@@ -72,8 +72,8 @@ if [ ${#amount} -eq 0 ]; then
|
|||||||
clear
|
clear
|
||||||
echo
|
echo
|
||||||
echo "no amount entered - returning to menu ..."
|
echo "no amount entered - returning to menu ..."
|
||||||
sleep 2
|
sleep 3
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# TODO let user enter a description
|
# TODO let user enter a description
|
||||||
|
@@ -34,7 +34,7 @@ if [ ${chainOutSync} -eq 1 ]; then
|
|||||||
echo
|
echo
|
||||||
echo "# PRESS ENTER to return to menu"
|
echo "# PRESS ENTER to return to menu"
|
||||||
read key
|
read key
|
||||||
exit 1
|
exit 0
|
||||||
else
|
else
|
||||||
echo "# OK - the chain is synced"
|
echo "# OK - the chain is synced"
|
||||||
fi
|
fi
|
||||||
|
@@ -36,7 +36,7 @@ if [ ${chainOutSync} -eq 1 ]; then
|
|||||||
echo
|
echo
|
||||||
echo "# PRESS ENTER to return to menu"
|
echo "# PRESS ENTER to return to menu"
|
||||||
read key
|
read key
|
||||||
exit 1
|
exit 0
|
||||||
else
|
else
|
||||||
echo "# OK - the chain is synced"
|
echo "# OK - the chain is synced"
|
||||||
fi
|
fi
|
||||||
@@ -57,7 +57,7 @@ if [ ${confirmedBalance} -eq 0 ]; then
|
|||||||
echo
|
echo
|
||||||
echo "Press ENTER to return to main menu."
|
echo "Press ENTER to return to main menu."
|
||||||
read key
|
read key
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# check number of connected peers
|
# check number of connected peers
|
||||||
@@ -74,7 +74,7 @@ if [ ${numConnectedPeers} -eq 0 ]; then
|
|||||||
echo
|
echo
|
||||||
echo "Press ENTER to return to main menu."
|
echo "Press ENTER to return to main menu."
|
||||||
read key
|
read key
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# let user pick a peer to open a channels with
|
# let user pick a peer to open a channels with
|
||||||
@@ -109,7 +109,7 @@ if [ ${#pubKey} -eq 0 ]; then
|
|||||||
echo
|
echo
|
||||||
echo "no channel selected - returning to menu ..."
|
echo "no channel selected - returning to menu ..."
|
||||||
sleep 4
|
sleep 4
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# find out what is the minimum amount
|
# find out what is the minimum amount
|
||||||
@@ -140,7 +140,7 @@ if [ ${#amount} -eq 0 ]; then
|
|||||||
echo
|
echo
|
||||||
echo "no valid amount entered - returning to menu ..."
|
echo "no valid amount entered - returning to menu ..."
|
||||||
sleep 4
|
sleep 4
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# let user enter a confirmation target
|
# let user enter a confirmation target
|
||||||
@@ -154,7 +154,7 @@ if [ ${#conf_target} -eq 0 ]; then
|
|||||||
echo
|
echo
|
||||||
echo "no valid target entered - returning to menu ..."
|
echo "no valid target entered - returning to menu ..."
|
||||||
sleep 4
|
sleep 4
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# build command
|
# build command
|
||||||
|
@@ -40,7 +40,7 @@ while [ "${chainInSync}" == "0" ]; do
|
|||||||
--pause "\n\n'$lncommand getinfo' shows 'synced_to_chain': false\n\nTry again in a few seconds." 15 60 5
|
--pause "\n\n'$lncommand getinfo' shows 'synced_to_chain': false\n\nTry again in a few seconds." 15 60 5
|
||||||
|
|
||||||
if [ $? -gt 0 ]; then
|
if [ $? -gt 0 ]; then
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
chainInSync=${cmdChainInSync}
|
chainInSync=${cmdChainInSync}
|
||||||
done
|
done
|
||||||
@@ -57,8 +57,9 @@ if [ ${openChannels} -eq 0 ]; then
|
|||||||
echo "!!!!!!!!!!!!!!!!!!!"
|
echo "!!!!!!!!!!!!!!!!!!!"
|
||||||
echo "FAIL - You have NO ESTABLISHED CHANNELS .. open a channel first."
|
echo "FAIL - You have NO ESTABLISHED CHANNELS .. open a channel first."
|
||||||
echo "!!!!!!!!!!!!!!!!!!!"
|
echo "!!!!!!!!!!!!!!!!!!!"
|
||||||
|
sleep 3
|
||||||
echo
|
echo
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
paymentRequestStart="???"
|
paymentRequestStart="???"
|
||||||
@@ -95,8 +96,8 @@ if [ ${#invoice} -eq 0 ]; then
|
|||||||
clear
|
clear
|
||||||
echo
|
echo
|
||||||
echo "no invoice entered - returning to menu ..."
|
echo "no invoice entered - returning to menu ..."
|
||||||
sleep 2
|
sleep 3
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# TODO: maybe try/show the decoded info first by using https://api.lightning.community/#decodepayreq
|
# TODO: maybe try/show the decoded info first by using https://api.lightning.community/#decodepayreq
|
||||||
|
Reference in New Issue
Block a user