mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2024-11-20 10:12:06 +01:00
#214 add auto-recover on recover
This commit is contained in:
parent
4e95faa0ec
commit
b6a28f52dd
@ -454,7 +454,7 @@ if [ ${check} -eq 1 ]; then choice="on"; fi
|
||||
if [ "${BTCPayServer}" != "${choice}" ]; then
|
||||
echo "BTCPayServer setting changed .."
|
||||
anychange=1
|
||||
/home/admin/config.scripts/bonus.btcpayserver.sh ${choice}
|
||||
/home/admin/config.scripts/bonus.btcpayserver.sh ${choice} tor
|
||||
errorOnInstall=$?
|
||||
if [ "${choice}" = "on" ]; then
|
||||
if [ ${errorOnInstall} -eq 0 ]; then
|
||||
|
@ -255,8 +255,15 @@ fi
|
||||
|
||||
# BTCPAYSERVER - not restored due to need for domain name and port forwarding
|
||||
if [ "${BTCPayServer}" = "on" ]; then
|
||||
echo "Setting BTCPayServer to be off - will need to be reinstalled from the menu again" >> ${logFile}
|
||||
sudo sed -i "s/^BTCPayServer=.*/BTCPayServer=off/g" /mnt/hdd/raspiblitz.conf
|
||||
|
||||
if [ "${runBehindTor}" = "on" ]; && [ "${BTCPayDomain}" = "localhost" ] then
|
||||
echo "Provisioning BTCPAYSERVER on TOR - run config script" >> ${logFile}
|
||||
sudo -u admin /home/admin/config.scripts/bonus.btcpayserver.sh on tor >> ${logFile} 2>&1
|
||||
else
|
||||
# provisioning non-TOR BTCPayServer is not supported yet - needs manual reinstall
|
||||
echo "Setting BTCPayServer to be off - will need to be reinstalled from the menu again" >> ${logFile}
|
||||
sudo sed -i "s/^BTCPayServer=.*/BTCPayServer=off/g" /mnt/hdd/raspiblitz.conf
|
||||
fi
|
||||
else
|
||||
echo "Provisioning BTCPayServer - keep default" >> ${logFile}
|
||||
fi
|
||||
@ -341,8 +348,6 @@ else
|
||||
echo "Provisioning UPS - not active" >> ${logFile}
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# replay backup LND conf & tlscerts
|
||||
# https://github.com/rootzoll/raspiblitz/issues/324
|
||||
echo "" >> ${logFile}
|
||||
|
@ -5,7 +5,7 @@
|
||||
# command info
|
||||
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
|
||||
echo "config script to switch BTCPay Server on or off"
|
||||
echo "bonus.btcpayserver.sh [on|off]"
|
||||
echo "bonus.btcpayserver.sh [on|off|menu] [ip|tor]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -66,8 +66,14 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
# echo "exiting as user cancelled BTCPayServer installation"
|
||||
# exit 1
|
||||
#fi
|
||||
sudo sed -i "s/^BTCPayDomain=.*/BTCPayDomain='localhost'/g" /mnt/hdd/raspiblitz.conf
|
||||
/home/admin/config.scripts/internet.hiddenservice.sh btcpay 80 23000
|
||||
|
||||
if [ "$2" == "tor" ]; then
|
||||
sudo sed -i "s/^BTCPayDomain=.*/BTCPayDomain='localhost'/g" /mnt/hdd/raspiblitz.conf
|
||||
/home/admin/config.scripts/internet.hiddenservice.sh btcpay 80 23000
|
||||
else
|
||||
echo "# FAIL - at the moment only BTCPay Server over TOR is supported"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# check for $BTCPayDomain
|
||||
source /mnt/hdd/raspiblitz.conf
|
||||
|
Loading…
Reference in New Issue
Block a user