Encourage restart after setting static address

This commit is contained in:
Bob Mottram 2016-10-22 21:28:30 +01:00
parent 6ce080543d
commit 33c992814c
1 changed files with 7 additions and 18 deletions

View File

@ -1360,24 +1360,13 @@ Enter a static local IP address for this system.\n\nIt will typically be ${IPv4_
function_check pihole_change_ipv4
pihole_change_ipv4 ${NEW_STATIC_IP}
systemctl restart networking
# see if the IP address has changed
IPv4_address=$(get_ipv4_address)
if [[ "$IPv4_address" == "${NEW_STATIC_IP}"* ]]; then
pihole_update
dialog --title $"Static local IP address" \
--msgbox $"The IP address of this system is now set to ${NEW_STATIC_IP}" 6 50
else
dialog --title $"Static local IP address" \
--backtitle $"Freedombone Control Panel" \
--defaultno \
--yesno $"\nFor the change to take effect your system will now need to reboot. Do this now?" 8 60
sel=$?
case $sel in
0) reboot;;
esac
fi
dialog --title $"Static local IP address" \
--backtitle $"Freedombone Control Panel" \
--yesno $"\nFor the change to take effect your system will now need to reboot. Do this now?" 8 60
sel=$?
case $sel in
0) reboot;;
esac
fi
fi
}