fix: correct check to see if service is running
This sometimes bizarrely returned a value of 'true' when it wasn't....
This commit is contained in:
@@ -279,8 +279,9 @@ service_container_rm() {
|
||||
local SERVICE_NAME="$(get_service_name "$SERVICE")"
|
||||
|
||||
service_stop "$SERVICE"
|
||||
local ID=$(docker inspect "$SERVICE_NAME" -f '{{ .ID }}' 2> /dev/null || true)
|
||||
[[ -z "$ID" ]] && return 0
|
||||
if ! docker inspect "$SERVICE_NAME" -f '{{ .ID }}' > /dev/null 2>&1; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
dokku_log_verbose_quiet "Removing container"
|
||||
docker update --restart=no "$SERVICE_NAME" > /dev/null 2>&1
|
||||
|
||||
Reference in New Issue
Block a user