added logic to only backup is gateway ip is different
This commit is contained in:
@@ -43,8 +43,10 @@ foreach ($config['virtualip']['vip'] as $i => $vip) {
|
||||
if (filter_var($gatewayIP, FILTER_VALIDATE_IP)) {
|
||||
foreach ($config['gateways']['gateway_item'] as $i => $gateway) {
|
||||
if ($gateway['name'] == $gatewayName) {
|
||||
$config['gateways']['gateway_item'][$i]['gateway'] = $gatewayIP;
|
||||
write_config_and_restart_services($wanInterface);
|
||||
if ($gateway['gateway'] != $gatewayIP) {
|
||||
$config['gateways']['gateway_item'][$i]['gateway'] = $gatewayIP;
|
||||
write_config_and_restart_services($wanInterface);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user