From 26683008dad73f1bb1d179071bc96a98d56cbdb3 Mon Sep 17 00:00:00 2001 From: rootzoll Date: Thu, 23 Jul 2020 14:48:32 +0200 Subject: [PATCH] fix var names --- home.admin/config.scripts/internet.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/home.admin/config.scripts/internet.sh b/home.admin/config.scripts/internet.sh index 5a56f8445..7289a2ace 100755 --- a/home.admin/config.scripts/internet.sh +++ b/home.admin/config.scripts/internet.sh @@ -13,10 +13,10 @@ source /mnt/hdd/raspiblitz.conf # get local IP localip_ALL=$(ip addr | grep 'state UP' -A2 | egrep -v 'docker0' | egrep -i '(*[eth|ens|enp|eno|wlan|wlp][0-9]$)' | tail -n1 | awk '{print $2}' | cut -f1 -d'/') localip_LAN=$(ip addr | grep 'state UP' -A2 | egrep -v 'docker0' | egrep -i '(*[eth][0-9]$)' | tail -n1 | awk '{print $2}' | cut -f1 -d'/') -localip="${localIP_ALL}" -if [ ${#localIP_LAN} -gt 0 ]; then +localip="${localip_ALL}" +if [ ${#localip_LAN} -gt 0 ]; then # prefer local IP over LAN over all other if available - localip="${localIP_LAN}" + localip="${localip_LAN}" fi # check for internet connection