Skip to content

Commit

Permalink
Merge pull request dokku#154 from janis-vitols/bug/ps/grep/binary
Browse files Browse the repository at this point in the history
Fix `No such container: Binary`
  • Loading branch information
josegonzalez authored Dec 2, 2018
2 parents 28a8a0f + 26a1948 commit 354309f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions functions
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ service_create_container() {
service_stop "$SERVICE" > /dev/null
docker run --rm -i -v "$SERVICE_HOST_ROOT/data:/var/lib/postgresql/data" "$PLUGIN_IMAGE:$PLUGIN_IMAGE_VERSION" bash -s < "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/scripts/enable_ssl.sh" &> /dev/null

PREVIOUS_ID=$(docker ps -f status=exited | grep -e "$SERVICE_NAME$" | awk '{print $1}') || true
PREVIOUS_ID=$(docker ps -f status=exited --no-trunc | grep -e "$SERVICE_NAME$" | awk '{print $1}') || true
docker start "$PREVIOUS_ID" > /dev/null
service_port_unpause "$SERVICE"

Expand Down Expand Up @@ -122,14 +122,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 PASSWORD="$(cat "$SERVICE_ROOT/PASSWORD")"

if [[ -n $PREVIOUS_ID ]]; then
Expand Down

0 comments on commit 354309f

Please sign in to comment.