2018-12-05 00:07:58 +01:00
|
|
|
#!/bin/bash
|
2018-07-17 13:12:03 +02:00
|
|
|
|
2018-12-06 14:36:02 +01:00
|
|
|
## get basic info
|
2019-02-02 23:49:04 +01:00
|
|
|
source /home/admin/raspiblitz.info
|
2018-12-12 18:21:01 +01:00
|
|
|
source /mnt/hdd/raspiblitz.conf
|
2018-07-29 01:33:54 +02:00
|
|
|
|
2019-01-14 18:34:21 +01:00
|
|
|
# show password info dialog
|
|
|
|
dialog --backtitle "RaspiBlitz - Recover Setup" --msgbox "Your previous RaspiBlitz config was recovered.
|
2018-07-17 13:12:03 +02:00
|
|
|
|
2018-12-12 18:21:01 +01:00
|
|
|
You need to set a new Password A:
|
2018-07-17 13:12:03 +02:00
|
|
|
A) Master User Password
|
|
|
|
|
2018-12-12 18:21:01 +01:00
|
|
|
Passwords B, C & D stay as before.
|
|
|
|
|
|
|
|
Follow Password Rules: Minimal of 8 chars,
|
2018-11-27 21:11:53 +01:00
|
|
|
no spaces and only special characters - or .
|
2018-07-17 13:12:03 +02:00
|
|
|
Write them down & store them in a safe place.
|
2018-12-12 18:21:01 +01:00
|
|
|
" 14 52
|
2018-07-17 13:12:03 +02:00
|
|
|
|
2019-01-14 18:34:21 +01:00
|
|
|
# call set password a script
|
|
|
|
sudo /home/admin/config.scripts/blitz.setpassword.sh a
|
2018-07-17 13:12:03 +02:00
|
|
|
|
2019-01-14 18:34:21 +01:00
|
|
|
# sucess info dialog
|
|
|
|
dialog --backtitle "RaspiBlitz" --msgbox "OK - password A was set\nfor all users pi, admin, root & bitcoin" 6 52
|
2018-11-28 12:42:52 +01:00
|
|
|
|
2019-01-14 18:34:21 +01:00
|
|
|
# activate lnd & bitcoin service
|
|
|
|
echo "Enabling Services"
|
|
|
|
sudo systemctl daemon-reload
|
|
|
|
sudo systemctl enable lnd.service
|
|
|
|
sudo systemctl enable ${network}d.service
|
|
|
|
if [ "${rtlWebinterface}" = "on" ]; then
|
|
|
|
sudo systemctl enable RTL
|
|
|
|
fi
|
2019-12-18 12:26:49 +00:00
|
|
|
if [ "${loop}" = "on" ]; then
|
|
|
|
sudo systemctl enable loopd
|
|
|
|
fi
|
|
|
|
if [ "${BTCRPCexplorer}" = "on" ]; then
|
|
|
|
sudo systemctl enable btc-rpc-explorer
|
|
|
|
fi
|
|
|
|
if [ "${ElectRS}" = "on" ]; then
|
|
|
|
sudo systemctl enable electrs
|
|
|
|
fi
|
2018-11-28 14:13:17 +01:00
|
|
|
|
2019-01-14 18:34:21 +01:00
|
|
|
# remove flag that freshly recovered
|
|
|
|
sudo rm /home/admin/raspiblitz.recover.info
|
2018-11-28 14:17:21 +01:00
|
|
|
|
2019-01-14 18:34:21 +01:00
|
|
|
# when auto-unlock is activated then Password C is needed to be restored on SD card
|
|
|
|
if [ "${autoUnlock}" = "on" ]; then
|
2018-12-12 18:21:01 +01:00
|
|
|
|
2019-01-14 18:34:21 +01:00
|
|
|
# reset auto-unlock feature
|
|
|
|
dialog --backtitle "RaspiBlitz - Setup" --msgbox "You had the Auto-Unlock feature enabled.
|
2018-12-24 02:51:11 +01:00
|
|
|
|
|
|
|
In the next dialog you need to re-enter your
|
|
|
|
ACTUAL/OLD Password C to re-activate the
|
|
|
|
Auto-Unlock feature. Enter a empty password
|
|
|
|
to deactivate the Auto-Unlock feature.
|
|
|
|
" 10 52
|
2019-04-17 03:23:46 +01:00
|
|
|
echo "Activating Auto-Unlock (please wait) .."
|
2019-01-14 18:34:21 +01:00
|
|
|
sudo /home/admin/config.scripts/lnd.autounlock.sh on
|
|
|
|
dialog --backtitle "RaspiBlitz" --msgbox "FINAL REBOOT IS NEEDED." 6 52
|
2018-07-29 01:33:54 +02:00
|
|
|
|
2019-01-14 18:34:21 +01:00
|
|
|
else
|
|
|
|
dialog --backtitle "RaspiBlitz" --msgbox "OK - SSH password A set.\nFINAL REBOOT IS NEEDED." 6 52
|
|
|
|
fi
|
2018-11-28 14:13:17 +01:00
|
|
|
|
2019-12-11 14:03:52 +01:00
|
|
|
sudo /home/admin/XXshutdown.sh reboot
|