From 088ee071ca04d68d6cc379cbbb7eefd0f2843ade Mon Sep 17 00:00:00 2001 From: Stefan Siegl Date: Mon, 28 Mar 2016 20:34:17 +0200 Subject: [PATCH] Fix ps_restart to not exit ps_restartall_cmd calls ps_restart from a loop, if ps_restart exits because of a not deployed app further apps might not be restarted. --- plugins/ps/functions | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/ps/functions b/plugins/ps/functions index 930ba5ea3..f91985f60 100755 --- a/plugins/ps/functions +++ b/plugins/ps/functions @@ -128,9 +128,11 @@ ps_restart() { local APP="$1"; verify_app_name "$APP" local IMAGE_TAG=$(get_running_image_tag "$APP") - ! (is_deployed "$APP") && echo "App $APP has not been deployed" && exit 0 - - release_and_deploy "$APP" "$IMAGE_TAG" + if is_deployed "$APP"; then + release_and_deploy "$APP" "$IMAGE_TAG" + else + echo "App $APP has not been deployed" + fi } ps_scale() {