Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Commit

Permalink
Correct running state (#141)
Browse files Browse the repository at this point in the history
[Improvement]
- Start the application, if the StopAll checkbox is ticked, but the application is active, essentially resolving the conflict for the user.
  • Loading branch information
Heavybullets8 authored Nov 18, 2023
1 parent bb53c21 commit 09095a5
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions functions/update/pre_process.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,20 @@ pre_process() {
fi

if [[ $rollback == true || "$startstatus" == "STOPPED" ]]; then
if printf '%s\0' "${apps_with_status[@]}" | grep -iFxqz "${app_name},stopAll-on"; then

if printf '%s\0' "${apps_with_status[@]}" | grep -iFxqz "${app_name},stopAll-on" && [[ $startstatus == "ACTIVE" ]]; then
if ! start_app "$app_name"; then
echo_array+=("Failed to start $app_name")
echo_array
return 1
fi
elif printf '%s\0' "${apps_with_status[@]}" | grep -iFxqz "${app_name},stopAll-on"; then
echo_array+=("Stopped")
echo_array
return
elif ! check_replicas; then
return
fi

if ! check_replicas; then
echo_array
return
fi
Expand Down

0 comments on commit 09095a5

Please sign in to comment.