浏览代码

Update pihole after static IP assignment

Bob Mottram 9 年前
父节点
当前提交
8234215a24
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2
    2
      src/freedombone-controlpanel

+ 2
- 2
src/freedombone-controlpanel 查看文件

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 \