diff --git a/common-functions b/common-functions index 21c89e7..f2a9716 100755 --- a/common-functions +++ b/common-functions @@ -283,6 +283,7 @@ service_container_rm() { [[ -z "$ID" ]] && return 0 dokku_log_verbose_quiet "Removing container" + docker update --restart=no "$SERVICE_NAME" > /dev/null 2>&1 if ! docker rm "$SERVICE_NAME" > /dev/null 2>&1; then dokku_log_fail "Unable to remove container for service $SERVICE" fi diff --git a/subcommands/upgrade b/subcommands/upgrade index 37cd4c6..76f1a9b 100755 --- a/subcommands/upgrade +++ b/subcommands/upgrade @@ -21,8 +21,6 @@ service-upgrade-cmd() { verify_service_name "$SERVICE" local SERVICE_ROOT="$PLUGIN_DATA_ROOT/$SERVICE" - local ID="$(cat "$SERVICE_ROOT/ID")" - is_container_status "$ID" "Running" || dokku_log_fail "Service ${SERVICE} container is not running" service_parse_args "${@:2}" @@ -40,6 +38,7 @@ service-upgrade-cmd() { if [[ "$SERVICE_RESTART_APPS" == "true" ]]; then dokku_log_info2 "Stopping all linked services" for app in $(service_linked_apps "$SERVICE"); do + [[ "$app" == "-" ]] && continue ps_stop "$app" done fi @@ -51,6 +50,7 @@ service-upgrade-cmd() { if [[ "$SERVICE_RESTART_APPS" == "true" ]]; then dokku_log_info2 "Starting all linked services" for app in $(service_linked_apps "$SERVICE"); do + [[ "$app" == "-" ]] && continue ps_start "$app" done fi diff --git a/tests/test_helper.bash b/tests/test_helper.bash old mode 100644 new mode 100755 index 9aa1026..39b6092 --- a/tests/test_helper.bash +++ b/tests/test_helper.bash @@ -1,5 +1,4 @@ #!/usr/bin/env bash -export DOKKU_QUIET_OUTPUT=1 export DOKKU_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/dokku" export DOKKU_VERSION=${DOKKU_VERSION:-"master"} export PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/bin:$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/dokku:$PATH"