From 61d61eae7085218457ef85d07db2f1f158fa8772 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sun, 6 Sep 2015 19:39:41 -0400 Subject: [PATCH] Do not fail on service_stop when a service is already stopped The desired state already exists, so this isn't strictly an error state. --- functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions b/functions index b74f770..9faa338 100755 --- a/functions +++ b/functions @@ -211,7 +211,7 @@ service_stop() { local SERVICE_ROOT="$PLUGIN_DATA_ROOT/$SERVICE"; local SERVICE_NAME=$(get_service_name "$SERVICE") local ID=$(docker ps -f status=running | grep "$SERVICE_NAME" | awk '{print $1}') || true - [[ -z $ID ]] && dokku_log_fail "Service is already stopped" + [[ -z $ID ]] && dokku_log_warn "Service is already stopped" && return 0 if [[ -n $ID ]]; then dokku_log_info1_quiet "Stopping container"