From ff1cfb578f87ced958a3fb719fea534558cf481d Mon Sep 17 00:00:00 2001 From: William Wernert Date: Thu, 3 Dec 2020 15:26:59 -0500 Subject: [PATCH] Only kill+start on final loop and increase time between status checks --- setup/so-functions | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/setup/so-functions b/setup/so-functions index e17fa23ce..d6c309431 100755 --- a/setup/so-functions +++ b/setup/so-functions @@ -1650,13 +1650,16 @@ salt_checkin() { count=0 while ! (check_service_status "$service"); do - systemctl kill "$service" - systemctl start "$service" - if [ $count -gt 120 ]; then + if [ $count -eq 12 ]; then + systemctl kill "$service" + systemctl start "$service" + fi + + if [ $count -gt 12 ]; then echo "$service could not be restarted in 120 seconds, exiting" >> "$setup_log" 2>&1 kill -SIGUSR1 "$(ps --pid $$ -oppid=)"; exit 1 fi - sleep 1; + sleep 10; ((count++)) done done