diff --git a/home.admin/config.scripts/bonus.rtl.sh b/home.admin/config.scripts/bonus.rtl.sh index 2774b91..c015707 100755 --- a/home.admin/config.scripts/bonus.rtl.sh +++ b/home.admin/config.scripts/bonus.rtl.sh @@ -16,6 +16,11 @@ if [ ${#network} -eq 0 ]; then exit 1 fi +# add default value to raspi config if needed +if [ ${#rtlWebinterface} -eq 0 ]; then + echo "rtlWebinterface=off" >> /mnt/hdd/raspiblitz.conf +fi + # stop services echo "making sure services are not running" sudo systemctl stop RTL 2>/dev/null diff --git a/home.admin/config.scripts/internet.tor.sh b/home.admin/config.scripts/internet.tor.sh index abff50a..a8b7c1e 100755 --- a/home.admin/config.scripts/internet.tor.sh +++ b/home.admin/config.scripts/internet.tor.sh @@ -21,6 +21,11 @@ if [ ${#network} -eq 0 ]; then exit 1 fi +# add default value to raspi config if needed +if [ ${#runBehindTor} -eq 0 ]; then + echo "runBehindTor=off" >> /mnt/hdd/raspiblitz.conf +fi + # location of TOR config torrc="/etc/tor/torrc" diff --git a/home.admin/config.scripts/lnd.autonat.sh b/home.admin/config.scripts/lnd.autonat.sh index 5c6574e..0bacc07 100644 --- a/home.admin/config.scripts/lnd.autonat.sh +++ b/home.admin/config.scripts/lnd.autonat.sh @@ -26,6 +26,12 @@ fi echo "making sure services are not running" sudo systemctl stop lnd 2>/dev/null +# add default value to raspi config if needed +source /mnt/hdd/raspiblitz.conf +if [ ${#autoNatDiscovery} -eq 0 ]; then + echo "autoNatDiscovery=off" >> /mnt/hdd/raspiblitz.conf +fi + # switch on if [ "$1" = "1" ] || [ "$1" = "on" ]; then echo "switching the LND autonat ON" diff --git a/home.admin/config.scripts/lnd.autopilot.sh b/home.admin/config.scripts/lnd.autopilot.sh index a788f73..8a74bcf 100644 --- a/home.admin/config.scripts/lnd.autopilot.sh +++ b/home.admin/config.scripts/lnd.autopilot.sh @@ -27,6 +27,12 @@ if [ ${valueExists} -eq 0 ]; then sudo sed -i '$ a autopilot.maxchannels=5' /mnt/hdd/lnd/lnd.conf fi +# add default value to raspi config if needed +source /mnt/hdd/raspiblitz.conf +if [ ${#autoPilot} -eq 0 ]; then + echo "autoPilot=off" >> /mnt/hdd/raspiblitz.conf +fi + # switch on if [ "$1" = "1" ] || [ "$1" = "on" ]; then echo "switching the LND autopilot ON"