covnerted while always true loop to a do while loop
This commit is contained in:
@@ -179,7 +179,7 @@ sleep(30);
|
||||
# try to sync carp settings to backup node/router
|
||||
printf("Starting the CARP Sync. \n");
|
||||
printf("Trying to ping sync host, %s. \n", $syncIP);
|
||||
while (true) {
|
||||
do {
|
||||
exec("ping -c 4 " . $syncIP, $output, $result);
|
||||
if ($result == 0) {
|
||||
printf("Ping is successful. \n");
|
||||
@@ -187,7 +187,7 @@ while (true) {
|
||||
} else {
|
||||
printf("Ping unsuccessful. \n");
|
||||
}
|
||||
}
|
||||
} while (true)
|
||||
|
||||
printf("Sleeping for 30 seconds. \n");
|
||||
sleep(30);
|
||||
|
||||
Reference in New Issue
Block a user