change all place where shutdown script is used

This commit is contained in:
rootzoll 2021-06-24 19:30:33 +02:00
parent 9ea7893c15
commit a28fa2b6ca
15 changed files with 21 additions and 23 deletions

View File

@ -324,7 +324,7 @@ case $CHOICE in
if [ $confirmationReboot -eq 0 ]; then
clear
echo ""
sudo /home/admin/XXshutdown.sh reboot
sudo /home/admin/config.scripts/blitz.shutdown.sh reboot
exit 1
fi
;;
@ -335,13 +335,13 @@ case $CHOICE in
if [ $confirmationShutdown -eq 0 ]; then
clear
echo ""
sudo /home/admin/XXshutdown.sh
sudo /home/admin/config.scripts/blitz.shutdown.sh
exit 1
fi
;;
DELETE)
sudo /home/admin/XXcleanHDD.sh
sudo /home/admin/XXshutdown.sh reboot
sudo /home/admin/config.scripts/blitz.shutdown.sh reboot
exit 1
;;
*)

View File

@ -436,5 +436,5 @@ if [ ${needsReboot} -eq 1 ]; then
# stop bitcoind
sudo -u bitcoin ${network}-cli stop
sleep 4
sudo /home/admin/XXshutdown.sh reboot
sudo /home/admin/config.scripts/blitz.shutdown.sh reboot
fi

View File

@ -445,5 +445,5 @@ if [ ${needsReboot} -eq 1 ]; then
# stop bitcoind
sudo -u bitcoin ${network}-cli stop
sleep 4
sudo /home/admin/XXshutdown.sh reboot
sudo /home/admin/config.scripts/blitz.shutdown.sh reboot
fi

View File

@ -26,7 +26,7 @@ elif [ "${CHOICE}" = "RESYNC" ]; then
dialog --pause "OK. System will reboot to activate changes." 8 58 8
clear
echo "rebooting .. (please wait)"
sudo /home/admin/XXshutdown.sh reboot
sudo /home/admin/config.scripts/blitz.shutdown.sh reboot
elif [ "${CHOICE}" = "REINDEX" ]; then
echo "Starting REINDEX ..."

View File

@ -76,7 +76,7 @@ case $CHOICE in
echo
echo "Press ENTER when your backup download is done to shutdown."
read key
/home/admin/XXshutdown.sh
/home/admin/config.scripts/blitz.shutdown.sh
;;
MIGRATION)
sudo /home/admin/config.scripts/blitz.migration.sh "export-gui"

View File

@ -58,7 +58,7 @@ case $CHOICE in
RESET)
sudo /home/admin/config.scripts/lnd.credentials.sh reset
sudo /home/admin/config.scripts/lnd.credentials.sh sync
sudo /home/admin/XXshutdown.sh reboot
sudo /home/admin/config.scripts/blitz.shutdown.sh reboot
exit 0;;
SYNC)
sudo /home/admin/config.scripts/lnd.credentials.sh sync

View File

@ -104,7 +104,7 @@ case $CHOICE in
sudo -u bitcoin ${network}-cli stop
echo "Press ENTER to Reboot."
read key
sudo /home/admin/XXshutdown.sh reboot
sudo /home/admin/config.scripts/blitz.shutdown.sh reboot
exit 0
fi
;;

View File

@ -126,7 +126,7 @@ patch()
if [ $? -eq 0 ]; then
clear
echo "REBOOT .."
/home/admin/XXshutdown.sh reboot
/home/admin/config.scripts/blitz.shutdown.sh reboot
sleep 8
else
echo "SKIP REBOOT .."
@ -238,7 +238,7 @@ Do you really want to update LND now?
if [ "${loop}" == "on" ]; then
sudo -u admin /home/admin/config.scripts/bonus.loop.sh on
fi
/home/admin/XXshutdown.sh reboot
/home/admin/config.scripts/blitz.shutdown.sh reboot
sleep 8
fi
;;
@ -262,7 +262,7 @@ Do you really want to update LND now?
if [ ${#error} -gt 0 ]; then
whiptail --title "ERROR" --msgbox "${error}" 8 30
else
/home/admin/XXshutdown.sh reboot
/home/admin/config.scripts/blitz.shutdown.sh reboot
sleep 8
fi
;;

View File

@ -522,7 +522,7 @@ class AppWindow(QMainWindow):
process = QProcess(self)
process.start('uxterm', ['-fa', 'Terminus', '-fs', '9', '-fn', 'fixed', '-into', str(int(self.ui.widget.winId())),
'+sb', '-hold', '-e', 'bash -c \"sudo /home/admin/XXshutdown.sh\"'])
'+sb', '-hold', '-e', 'bash -c \"sudo /home/admin/config.scripts/blitz.shutdown.sh\"'])
def b4_restart(self):
log.info("restart")
@ -532,7 +532,7 @@ class AppWindow(QMainWindow):
process = QProcess(self)
process.start('uxterm', ['-fa', 'Terminus', '-fs', '9', '-fn', 'fixed', '-into', str(int(self.ui.widget.winId())),
'+sb', '-hold', '-e', 'bash -c \"sudo /home/admin/XXshutdown.sh reboot\"'])
'+sb', '-hold', '-e', 'bash -c \"sudo /home/admin/config.scripts/blitz.shutdown.sh reboot\"'])
def create_new_invoice(self, memo="Pay to RaspiBlitz", amt=0):
if IS_DEV_ENV:

View File

@ -32,8 +32,7 @@ function repair() {
# command: restart
function restart() {
cd /home/admin
./XXshutdown.sh reboot
/home/admin/config.scripts/blitz.shutdown.sh reboot
}
# command: sourcemode
@ -61,8 +60,7 @@ function patch() {
# command: off
function off() {
cd /home/admin
./XXshutdown.sh
/home/admin/config.scripts/blitz.shutdown.sh
}
# command: github

View File

@ -377,7 +377,7 @@ if [ "$1" = "export-gui" ]; then
read key
echo "Shutting down ...."
sleep 4
/home/admin/XXshutdown.sh
/home/admin/config.scripts/blitz.shutdown.sh
exit 0
fi

View File

@ -453,7 +453,7 @@ fi
# when started with menu ... reboot when done
if [ "${reboot}" == "1" ]; then
echo "Now rebooting to activate changes ..."
sudo /home/admin/XXshutdown.sh reboot
sudo /home/admin/config.scripts/blitz.shutdown.sh reboot
else
echo "..."
fi

View File

@ -1,5 +1,5 @@
#!/bin/bash
# for reboot call: sudo /home/admin/XXshutdown.sh reboot
# for reboot call: sudo /home/admin/config.scripts/blitz.shutdown.sh reboot
# use this script instead of dirct shutdown command to:
# 1) give UI the info that a reboot/shutdown is now happening

View File

@ -44,7 +44,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
# some APC UPS were not running stable below 90% Battery - so start shutdown at 95% remaining
sudo sed -i "s/^BATTERYLEVEL.*/BATTERYLEVEL 95/g" /etc/apcupsd/apcupsd.conf
sudo sed -i "s/^ISCONFIGURED=.*/ISCONFIGURED=yes/g" /etc/default/apcupsd
sudo sed -i "s/^SHUTDOWN=.*/SHUTDOWN=\/home\/admin\/XXshutdown.sh/g" /etc/apcupsd/apccontrol
sudo sed -i "s/^SHUTDOWN=.*/SHUTDOWN=\/home\/admin\/config.scripts\/blitz.shutdown.sh/g" /etc/apcupsd/apccontrol
sudo sed -i "s/^WALL=.*/#WALL=wall/g" /etc/apcupsd/apccontrol
sudo systemctl enable apcupsd
sudo systemctl start apcupsd

View File

@ -100,4 +100,4 @@ sleep 4
# clean logs (to prevent a false reindex detection)
sudo rm /mnt/hdd/${network}/debug.log 2>/dev/null
# reboot
sudo /home/admin/XXshutdown.sh reboot
sudo /home/admin/config.scripts/blitz.shutdown.sh reboot