diff --git a/functions/update_apps.sh b/functions/update_apps.sh index 766ace10..ec807f5d 100644 --- a/functions/update_apps.sh +++ b/functions/update_apps.sh @@ -178,19 +178,16 @@ if [[ $rollback == "true" || "$startstatus" == "STOPPED" ]]; then old_status=$status elif [[ $verify == "true" ]]; then before_loop=$(head -n 1 temp.txt) - new_status=$old_status 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 - new_status=$( grep "^$app_name," temp.txt | awk -F ',' '{print $2}') + status=$( grep "^$app_name," temp.txt | awk -F ',' '{print $2}') sleep 1 if ! echo -e "$(head -n 1 temp.txt)" | grep -qs ^"$before_loop" ; then before_loop=$(head -n 1 temp.txt) ((current_loop++)) fi done - old_status=$new_status - status=$( grep "^$app_name," temp.txt | awk -F ',' '{print $2}') unset verify fi (( count++ ))