Browse Source

#273 prevent double publicIP entry

dev
rootzoll 6 years ago
parent
commit
2c6f3f3279
  1. 3
      home.admin/_bootstrap.sh

3
home.admin/_bootstrap.sh

@ -257,7 +257,8 @@ if [ ${configExists} -eq 1 ]; then
# update public IP on boot
freshPublicIP=$(curl -s http://v4.ipv6-test.com/api/myip.php)
if [ ${#publicIP} -eq 0 ]; then
publicIPValueExists=$( sudo cat ${configFile} | grep -c 'publicIP=' )
if [ ${publicIPValueExists} -eq 0 ]; then
echo "create value (${freshPublicIP})" >> $logFile
echo "publicIP=${freshPublicIP}" >> $configFile
else

Loading…
Cancel
Save