moved the logic around to only sync when master node

This commit is contained in:
2021-12-04 16:32:44 -05:00
parent 3ae1d9f4a6
commit a9de0535ab

View File

@@ -308,9 +308,7 @@ if ($carpStatus == "MASTER") {
write_config_and_restart_services($wanInterface);
echo_write_log("Done Setting WAN to Static based on the DHCP information");
} else {
echo_write_log("Router is not currently CARP master, not updating");
}
echo_write_log("Testing to see if this router is the HA sync master");
if (filter_var($config['hasync']['synchronizetoip'], FILTER_VALIDATE_IP)) {
echo_write_log("Sleeping for 30 seconds");
@@ -337,4 +335,7 @@ if (filter_var($config['hasync']['synchronizetoip'], FILTER_VALIDATE_IP)) {
} else {
echo_write_log("Router is not the HA sync master");
}
} else {
echo_write_log("Router is not currently CARP master, not updating");
echo_write_log("End of Script " . $argv[0]);