Parcourir la source

Update pihole after static IP assignment

Bob Mottram il y a 9 ans
Parent
révision
8234215a24
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2
    2
      src/freedombone-controlpanel

+ 2
- 2
src/freedombone-controlpanel Voir le fichier

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