From 39a78640228f1025e314e3fc087faa37a999dd7f Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sun, 2 Dec 2018 14:29:24 -0500 Subject: [PATCH] fix: correct issues where docker ps is truncated This should actually be refactored to avoid the grep call completely, but the current fix will correct the issue for now. Refs dokku/dokku-postgres#131 --- functions | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions b/functions index d1d5a0e..fcfd913 100755 --- a/functions +++ b/functions @@ -119,14 +119,14 @@ service_start() { local QUIET="$2" local SERVICE_ROOT="$PLUGIN_DATA_ROOT/$SERVICE" local SERVICE_NAME="$(get_service_name "$SERVICE")" - local ID=$(docker ps -f status=running | grep -e "$SERVICE_NAME$" | awk '{print $1}') || true + local ID=$(docker ps -f status=running --no-trunc | grep -e "$SERVICE_NAME$" | awk '{print $1}') || true if [[ -n $ID ]]; then [[ -z $QUIET ]] && dokku_log_warn "Service is already started" return 0 fi dokku_log_info2_quiet "Starting container" - local PREVIOUS_ID=$(docker ps -f status=exited | grep -e "$SERVICE_NAME$" | awk '{print $1}') || true + local PREVIOUS_ID=$(docker ps -f status=exited --no-trunc | grep -e "$SERVICE_NAME$" | awk '{print $1}') || true local ROOTPASSWORD="$(cat "$SERVICE_ROOT/ROOTPASSWORD")" local PASSWORD="$(cat "$SERVICE_ROOT/PASSWORD")"