From fc3ff1ef18603562acb0a8e48c406a928246b748 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 30 Jan 2022 16:25:10 +0100 Subject: [PATCH] Don't wait to stop services --- keepalived.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/keepalived.py b/keepalived.py index aff2e66..8aade5d 100755 --- a/keepalived.py +++ b/keepalived.py @@ -39,7 +39,9 @@ if __name__ == '__main__': parser.add_argument('STATE', type=State, choices=list(State)) parser.add_argument('PRIORITY', type=int) args = parser.parse_args() - time.sleep(2) + + if args.STATE == State.MASTER: + time.sleep(2) with open(os.path.join(path, "keepalived.json")) as config_file: config = json.load(config_file)