Only kill+start on final loop and increase time between status checks

This commit is contained in:
William Wernert
2020-12-03 15:26:59 -05:00
parent 7458313d3d
commit ff1cfb578f

View File

@@ -1650,13 +1650,16 @@ salt_checkin() {
count=0
while ! (check_service_status "$service"); do
if [ $count -eq 12 ]; then
systemctl kill "$service"
systemctl start "$service"
if [ $count -gt 120 ]; then
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