fix syntax

This commit is contained in:
rootzoll 2020-07-23 15:06:15 +02:00
parent f5efbb9a3a
commit 1ff8ffc2cf

View file

@ -27,11 +27,11 @@ source /mnt/hdd/raspiblitz.conf 2>/dev/null
# get local IP (from different sources) # get local IP (from different sources)
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_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'/')
if [ $(isValidIP ${localip_ALL}) -eq 0 ] then if [ $(isValidIP ${localip_ALL}) -eq 0 ]; then
localip_ALL="" localip_ALL=""
fi fi
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_LAN=$(ip addr | grep 'state UP' -A2 | egrep -v 'docker0' | egrep -i '(*[eth][0-9]$)' | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
if [ $(isValidIP ${localip_LAN}) -eq 0 ] then if [ $(isValidIP ${localip_LAN}) -eq 0 ]; then
localip_LAN="" localip_LAN=""
fi fi
localip="${localip_ALL}" localip="${localip_ALL}"