mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-29 04:52:32 +02:00
handle error case
This commit is contained in:
@@ -154,7 +154,6 @@ sleep 2
|
|||||||
|
|
||||||
if [ "$1" == "backup-torrent-hosting" ]; then
|
if [ "$1" == "backup-torrent-hosting" ]; then
|
||||||
|
|
||||||
|
|
||||||
# changing config - so it can be startup again after a reboot by bootstrap
|
# changing config - so it can be startup again after a reboot by bootstrap
|
||||||
source /mnt/hdd/raspiblitz.conf
|
source /mnt/hdd/raspiblitz.conf
|
||||||
if [ ${#backupTorrentSeeding} -eq 0 ]; then
|
if [ ${#backupTorrentSeeding} -eq 0 ]; then
|
||||||
@@ -170,6 +169,7 @@ if [ "$1" == "backup-torrent-hosting" ]; then
|
|||||||
sessionPID=$(screen -ls | grep "update" | cut -d "." -f1 | xargs)
|
sessionPID=$(screen -ls | grep "update" | cut -d "." -f1 | xargs)
|
||||||
echo "Putting rTorrent blockchain 'UPDATE' (PID=${sessionPID}) to background ... (please wait)"
|
echo "Putting rTorrent blockchain 'UPDATE' (PID=${sessionPID}) to background ... (please wait)"
|
||||||
sudo cpulimit -p ${sessionPID} -l 25 &
|
sudo cpulimit -p ${sessionPID} -l 25 &
|
||||||
|
sleep 6
|
||||||
echo "Done BACKUP TORRENT HOSTING"
|
echo "Done BACKUP TORRENT HOSTING"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
@@ -143,7 +143,7 @@ if [ ${walletExists} -eq 0 ]; then
|
|||||||
# UI: Ask if user wants NEW wallet or RECOVER a wallet
|
# UI: Ask if user wants NEW wallet or RECOVER a wallet
|
||||||
OPTIONS=(NEW "Setup a brand new Lightning Node (DEFAULT)" \
|
OPTIONS=(NEW "Setup a brand new Lightning Node (DEFAULT)" \
|
||||||
OLD "I had a old Node I want to recover/restore")
|
OLD "I had a old Node I want to recover/restore")
|
||||||
CHOICE=$(dialog --backtitle "RaspiBlitz - LND Setup" --clear --title "LND Data & Wallet" --menu "How to setup your node?:" 11 60 6 "${OPTIONS[@]}" 2>&1 >/dev/tty)
|
CHOICE=$(dialog --backtitle "RaspiBlitz" --clear --title "LND Setup" --menu "LND Data & Wallet" 11 60 6 "${OPTIONS[@]}" 2>&1 >/dev/tty)
|
||||||
echo "choice($CHOICE)"
|
echo "choice($CHOICE)"
|
||||||
|
|
||||||
if [ "${CHOICE}" == "NEW" ]; then
|
if [ "${CHOICE}" == "NEW" ]; then
|
||||||
@@ -167,10 +167,18 @@ if [ ${walletExists} -eq 0 ]; then
|
|||||||
sudo shred /home/admin/.pass.tmp 2>/dev/null
|
sudo shred /home/admin/.pass.tmp 2>/dev/null
|
||||||
|
|
||||||
# in case of error - retry
|
# in case of error - retry
|
||||||
if [ ${#err} -eq 0 ]; then
|
if [ ${#err} -gt 0 ]; then
|
||||||
whiptail --title "lnd.initwallet.py - ERROR" --msgbox "${err}" 8 50
|
whiptail --title "lnd.initwallet.py - ERROR" --msgbox "${err}" 8 50
|
||||||
/home/admin/70initLND.sh
|
/home/admin/70initLND.sh
|
||||||
exit 1
|
exit 1
|
||||||
|
else
|
||||||
|
if [ ${#seedwords} -eq 0 ]; then
|
||||||
|
echo "FAIL!! -> MISSING seedwords data - but also no err data ?!?"
|
||||||
|
echo "CHECK output data above - PRESS ENTER to retart 70initLND.sh"
|
||||||
|
read key
|
||||||
|
/home/admin/70initLND.sh
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# TODO: create numbered string in rows
|
# TODO: create numbered string in rows
|
||||||
|
Reference in New Issue
Block a user