From 21afe5b151d5a8a8357fb05a1eace00c36f8b995 Mon Sep 17 00:00:00 2001 From: Christian Rotzoll Date: Thu, 24 Sep 2020 21:01:16 +0200 Subject: [PATCH] #869 fix background script (#1588) --- home.admin/_background.sh | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/home.admin/_background.sh b/home.admin/_background.sh index 36d44177b..2bcce1b14 100755 --- a/home.admin/_background.sh +++ b/home.admin/_background.sh @@ -110,30 +110,26 @@ do publicIPChanged=$(/home/admin/config.scripts/internet.sh update-publicip | grep -c 'ip_changed=1') - # check if changed - elif [ ${publicIPChanged} -get 0 ]; then + # check if changed + elif [ ${publicIPChanged} -get 0 ]; then - # refresh data - source /mnt/hdd/raspiblitz.conf - - # only restart LND if auto-unlock is activated - if [ "${autoUnlock}" = "on" ]; then - echo "restart LND with to pickup up new publiIP" - sudo systemctl stop lnd - sudo systemctl start lnd - else - echo "new publicIP but no LND restart because no auto-unlock" - fi - - # trigger update if dnyamic domain (if set) - updateDynDomain=1 + # refresh data + source /mnt/hdd/raspiblitz.conf + # only restart LND if auto-unlock is activated + if [ "${autoUnlock}" = "on" ]; then + echo "restart LND with to pickup up new publiIP" + sudo systemctl stop lnd + sudo systemctl start lnd else - echo "public IP has not changed" + echo "new publicIP but no LND restart because no auto-unlock" fi + # trigger update if dnyamic domain (if set) + updateDynDomain=1 + else - echo "skip - because setup is still running" + echo "public IP has not changed" fi fi