remove newstatus variable, just use status instead

This commit is contained in:
Heavybullets8 2022-08-11 21:43:15 -06:00
parent 97896b27a2
commit 61eea4c9a5

View File

@ -178,19 +178,16 @@ if [[ $rollback == "true" || "$startstatus" == "STOPPED" ]]; then
old_status=$status old_status=$status
elif [[ $verify == "true" ]]; then elif [[ $verify == "true" ]]; then
before_loop=$(head -n 1 temp.txt) before_loop=$(head -n 1 temp.txt)
new_status=$old_status
current_loop=0 current_loop=0
until [[ "$new_status" != "$old_status" || $current_loop -gt 3 ]] # Wait for a specific change to app status, or 3 refreshes of the file to go by. until [[ "$status" != "$old_status" || $current_loop -gt 3 ]] # Wait for a specific change to app status, or 3 refreshes of the file to go by.
do do
new_status=$( grep "^$app_name," temp.txt | awk -F ',' '{print $2}') status=$( grep "^$app_name," temp.txt | awk -F ',' '{print $2}')
sleep 1 sleep 1
if ! echo -e "$(head -n 1 temp.txt)" | grep -qs ^"$before_loop" ; then if ! echo -e "$(head -n 1 temp.txt)" | grep -qs ^"$before_loop" ; then
before_loop=$(head -n 1 temp.txt) before_loop=$(head -n 1 temp.txt)
((current_loop++)) ((current_loop++))
fi fi
done done
old_status=$new_status
status=$( grep "^$app_name," temp.txt | awk -F ',' '{print $2}')
unset verify unset verify
fi fi
(( count++ )) (( count++ ))