Browse Source

scripts writing default config values

#146
rootzoll 6 years ago
parent
commit
fd4a4c90f6
  1. 5
      home.admin/config.scripts/bonus.rtl.sh
  2. 5
      home.admin/config.scripts/internet.tor.sh
  3. 6
      home.admin/config.scripts/lnd.autonat.sh
  4. 6
      home.admin/config.scripts/lnd.autopilot.sh

5
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

5
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"

6
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"

6
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"

Loading…
Cancel
Save