From 33c992814cc428d32225b88ccf57fa4e21dc951c Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 22 Oct 2016 21:28:30 +0100 Subject: [PATCH] Encourage restart after setting static address --- src/freedombone-controlpanel | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/src/freedombone-controlpanel b/src/freedombone-controlpanel index 0e82048e..a70108a2 100755 --- a/src/freedombone-controlpanel +++ b/src/freedombone-controlpanel @@ -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 }