From a8cb408d80cbefbc80c5d90bc74d8c700682f9fc Mon Sep 17 00:00:00 2001 From: openoms Date: Tue, 25 May 2021 14:24:17 +0100 Subject: [PATCH] fix variable names --- home.admin/config.scripts/bonus.rtl.sh | 116 +++++++++---------- home.admin/config.scripts/cln.install.sh | 66 +++++------ home.admin/config.scripts/network.aliases.sh | 27 ++++- 3 files changed, 114 insertions(+), 95 deletions(-) diff --git a/home.admin/config.scripts/bonus.rtl.sh b/home.admin/config.scripts/bonus.rtl.sh index 067140cef..25e590daa 100755 --- a/home.admin/config.scripts/bonus.rtl.sh +++ b/home.admin/config.scripts/bonus.rtl.sh @@ -52,13 +52,13 @@ fi # prefix for parallel services if [ ${CHAIN} = testnet ];then - chainprefix="t" + netprefix="t" portprefix=1 elif [ ${CHAIN} = signet ];then - chainprefix="s" + netprefix="s" portprefix=3 elif [ ${CHAIN} = mainnet ];then - chainprefix="" + netprefix="" portprefix="" fi @@ -104,13 +104,13 @@ Activate TOR to access the web interface from outside your local network. fi # add default value to raspi config if needed -if ! grep -Eq "^${chainprefix}${typeprefix}rtlWebinterface=" /mnt/hdd/raspiblitz.conf; then - echo "${chainprefix}${typeprefix}rtlWebinterface=off" >> /mnt/hdd/raspiblitz.conf +if ! grep -Eq "^${netprefix}${typeprefix}rtlWebinterface=" /mnt/hdd/raspiblitz.conf; then + echo "${netprefix}${typeprefix}rtlWebinterface=off" >> /mnt/hdd/raspiblitz.conf fi # stop services echo "# making sure services are not running" -sudo systemctl stop ${chainprefix}${typeprefix}RTL 2>/dev/null +sudo systemctl stop ${netprefix}${typeprefix}RTL 2>/dev/null function configRTL() { @@ -175,9 +175,9 @@ EOF if [ "$1" = "1" ] || [ "$1" = "on" ]; then echo "# Installing the RTL for ${LNTYPE} ${CHAIN}" - isInstalled=$(sudo ls /etc/systemd/system/${chainprefix}${typeprefix}RTL.service 2>/dev/null | grep -c "${chainprefix}${typeprefix}RTL.service") + isInstalled=$(sudo ls /etc/systemd/system/${netprefix}${typeprefix}RTL.service 2>/dev/null | grep -c "${netprefix}${typeprefix}RTL.service") if ! [ ${isInstalled} -eq 0 ]; then - echo "# OK, the ${chainprefix}${typeprefix}RTL.service is already installed." + echo "# OK, the ${netprefix}${typeprefix}RTL.service is already installed." else # check and install NodeJS /home/admin/config.scripts/bonus.nodejs.sh on @@ -230,19 +230,19 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then fi echo "# Updating Firewall" - sudo ufw allow ${RTLHTTP} comment "${chainprefix}${typeprefix}RTL HTTP" - sudo ufw allow $((RTLHTTP+1)) comment "${chainprefix}${typeprefix}RTL HTTPS" + sudo ufw allow ${RTLHTTP} comment "${netprefix}${typeprefix}RTL HTTP" + sudo ufw allow $((RTLHTTP+1)) comment "${netprefix}${typeprefix}RTL HTTPS" echo if [ $LNTYPE = lnd ];then echo "# Install service" echo "# Install RTL systemd for ${network} on ${chain}" - cat > /home/admin/${chainprefix}${typeprefix}RTL.service < /home/admin/${netprefix}${typeprefix}RTL.service <