changed DHCP config order to avoid errors.

This commit is contained in:
2026-03-09 11:29:54 +01:00
parent 41c02bca59
commit 8bd068c68e

View File

@@ -889,10 +889,6 @@ if [ "$external_access_method" -eq 2 ] || [ "$external_access_method" -eq 3 ]; t
# Apply the DHCP configuration # Apply the DHCP configuration
echo "Applying DHCP configuration..." echo "Applying DHCP configuration..."
docker exec pihole pihole-FTL --config dhcp.active true || {
echo "Error: Failed to enable DHCP"
exit 1
}
docker exec pihole pihole-FTL --config dhcp.start "$dhcp_start" || { docker exec pihole pihole-FTL --config dhcp.start "$dhcp_start" || {
echo "Error: Failed to set DHCP start" echo "Error: Failed to set DHCP start"
exit 1 exit 1
@@ -909,6 +905,10 @@ if [ "$external_access_method" -eq 2 ] || [ "$external_access_method" -eq 3 ]; t
echo "Error: Failed to set DHCP netmask" echo "Error: Failed to set DHCP netmask"
exit 1 exit 1
} }
docker exec pihole pihole-FTL --config dhcp.active true || {
echo "Error: Failed to enable DHCP"
exit 1
}
# Restart PiHole to apply changes # Restart PiHole to apply changes
echo "Restarting PiHole to apply changes..." echo "Restarting PiHole to apply changes..."