Browse Source

Update pihole after static IP assignment

Bob Mottram 9 years ago
parent
commit
8234215a24
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      src/freedombone-controlpanel

+ 2
- 2
src/freedombone-controlpanel View File

@@ -1369,16 +1369,16 @@ Enter a static local IP address for this system.\n\nIt will typically be 192.168
1369 1369
             echo '#    network 192.168.7.0' >> /etc/network/interfaces
1370 1370
             echo '#    gateway 192.168.7.1' >> /etc/network/interfaces
1371 1371
 
1372
-            pihole_change_ipv4 ${NEW_STATIC_IP}
1373
-
1374 1372
             systemctl restart networking
1375 1373
 
1376 1374
             # see if the IP address has changed
1377 1375
             IPv4_address=$(get_ipv4_address)
1378 1376
             if [[ "$IPv4_address" == "${NEW_STATIC_IP}"* ]]; then
1377
+                pihole_update
1379 1378
                 dialog --title $"Static local IP address" \
1380 1379
                        --msgbox $"The IP address of this system is now set to ${NEW_STATIC_IP}" 6 50
1381 1380
             else
1381
+                pihole_change_ipv4 ${NEW_STATIC_IP}
1382 1382
                 dialog --title $"Static local IP address" \
1383 1383
                        --backtitle $"Freedombone Control Panel" \
1384 1384
                        --defaultno \