From 007946f52a5fd73028fa2976a54a328791bef381 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sun, 12 Jul 2015 20:02:29 -0400 Subject: [PATCH] Use simplified method for retrieving a container id --- plugins/nginx-vhosts/commands | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/plugins/nginx-vhosts/commands b/plugins/nginx-vhosts/commands index e1ba8bebb..03a4ceaa1 100755 --- a/plugins/nginx-vhosts/commands +++ b/plugins/nginx-vhosts/commands @@ -49,13 +49,8 @@ case "$1" in shopt -u nullglob fi - DOKKU_APP_CIDS=$(get_container_ids $APP) - if [[ -n $DOKKU_APP_CIDS ]]; then - for DOKKU_APP_CID in $DOKKU_APP_CIDS; do - docker cp "$DOKKU_APP_CID:/app/nginx.conf" "$APP_NGINX_TEMPLATE" 2> /dev/null || true - break - done - fi + DOKKU_APP_CIDS=($(get_container_ids $APP)) + docker cp "${DOKKU_APP_CID[0]}:/app/nginx.conf" "$APP_NGINX_TEMPLATE" 2> /dev/null || true [[ -f "$DOKKU_ROOT/ENV" ]] && source $DOKKU_ROOT/ENV [[ -f "$DOKKU_ROOT/$APP/ENV" ]] && source $DOKKU_ROOT/$APP/ENV