From a073e7689c3b4294f3730e33de442197de8a1d06 Mon Sep 17 00:00:00 2001 From: Pavel Loginov Date: Sun, 5 Apr 2020 21:56:00 +0200 Subject: [PATCH] v4.2.1.0 https://haproxy-wi.org/changelog.py#4_2_1 --- app/tools/keep_alive.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/tools/keep_alive.py b/app/tools/keep_alive.py index 46cdf4c2..abe20489 100644 --- a/app/tools/keep_alive.py +++ b/app/tools/keep_alive.py @@ -34,8 +34,9 @@ def main(): funct.logging("localhost", " "+alert, keep_alive=1) start_command = [] - start_command.append('sudo systemct restart haproxy') + start_command.append('sudo systemctl restart haproxy') funct.ssh_command(serv[0], start_command) + time.sleep(30) continue except OSError as e: @@ -43,7 +44,7 @@ def main(): sys.exit() else: cur_stat_service = "Ok" - time.sleep(40) + if __name__ == "__main__": funct.logging("localhost", " Keep alive service started", keep_alive=1)