[fix] kill/start after if statement

This commit is contained in:
William Wernert
2020-12-03 14:55:23 -05:00
parent 2e516629f9
commit 916db4acec

View File

@@ -1674,12 +1674,12 @@ salt_checkin() {
count=0 count=0
while ! (check_salt_minion_status); do while ! (check_salt_minion_status); do
echo "salt master did not get a job response from salt minion" >> "$setup_log" 2>&1 echo "salt master did not get a job response from salt minion" >> "$setup_log" 2>&1
systemctl kill salt-minion
systemctl start salt-minion
if [ $count -gt 30 ]; then if [ $count -gt 30 ]; then
echo "salt master did not get a job response from salt minion after 30 attempts, exiting" >> "$setup_log" 2>&1 echo "salt master did not get a job response from salt minion after 30 attempts, exiting" >> "$setup_log" 2>&1
kill -SIGUSR1 "$(ps --pid $$ -oppid=)"; exit 1 kill -SIGUSR1 "$(ps --pid $$ -oppid=)"; exit 1
fi fi
systemctl kill salt-minion
systemctl start salt-minion
sleep 1; sleep 1;
((count++)) ((count++))
done done