From 9322200eae621c4c63bb63ca602788d8970f3a38 Mon Sep 17 00:00:00 2001 From: Michael Hobbs Date: Tue, 16 Dec 2014 16:25:57 -0800 Subject: [PATCH] lintball --- dokku | 2 +- plugins/domains/install | 4 ++-- plugins/nginx-vhosts/commands | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/dokku b/dokku index f9a6799f5..a9dfb56f7 100755 --- a/dokku +++ b/dokku @@ -37,7 +37,7 @@ case "$1" in echo "-----> Deploying $APP ..." dokku deploy $APP echo "=====> Application deployed:" - echo "$(dokku urls $APP | sed "s/^/ /")" + dokku urls $APP | sed "s/^/ /" echo ;; diff --git a/plugins/domains/install b/plugins/domains/install index 18b7ae028..5bf5d830d 100755 --- a/plugins/domains/install +++ b/plugins/domains/install @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x -for app in $(ls -d $DOKKU_ROOT/*/CONTAINER); do - APP=$(basename $(dirname $app)); +for app in $DOKKU_ROOT/*/CONTAINER; do + APP=$(basename "$(dirname $app)"); dokku domains:setup $APP done diff --git a/plugins/nginx-vhosts/commands b/plugins/nginx-vhosts/commands index 231abf487..79b9bc44f 100755 --- a/plugins/nginx-vhosts/commands +++ b/plugins/nginx-vhosts/commands @@ -43,10 +43,10 @@ EOF NGINX_CONF="$PLUGIN_PATH/nginx-vhosts/templates/nginx.ssl.conf" SCHEME="https" - SSL_HOSTNAME=`openssl x509 -in $SSL_INUSE/server.crt -noout -subject | tr '/' '\n' | grep CN= | cut -c4-` - SSL_HOSTNAME=`echo "$SSL_HOSTNAME" | sed 's|\.|\\.|g' | sed 's/\*/\.\*/g'` - SSL_VHOSTS=`egrep ^"$SSL_HOSTNAME"$ $VHOST_PATH` - NONSSL_VHOSTS=`egrep -v ^"$SSL_HOSTNAME"$ $VHOST_PATH || exit 0` + SSL_HOSTNAME=$(openssl x509 -in $SSL_INUSE/server.crt -noout -subject | tr '/' '\n' | grep CN= | cut -c4-) + SSL_HOSTNAME=$(echo "$SSL_HOSTNAME" | sed 's|\.|\\.|g' | sed 's/\*/\.\*/g') + SSL_VHOSTS=$(egrep ^"$SSL_HOSTNAME"$ $VHOST_PATH) + NONSSL_VHOSTS=$(egrep -v ^"$SSL_HOSTNAME"$ $VHOST_PATH || exit 0) while read line; do echo "-----> Configuring SSL for $line..." @@ -61,9 +61,9 @@ EOF NGINX_CONF=$APP_NGINX_TEMPLATE fi - cat $VHOST_PATH | xargs -i echo "-----> Configuring {}..." + xargs -i echo "-----> Configuring {}..." < $VHOST_PATH # Include SSL_VHOSTS so we can redirect http to https on that hostname as well - NOSSL_SERVER_NAME=`echo $NONSSL_VHOSTS $SSL_VHOSTS| tr '\n' ' '` + NOSSL_SERVER_NAME=$(echo $NONSSL_VHOSTS $SSL_VHOSTS| tr '\n' ' ') echo "-----> Creating $SCHEME nginx.conf" echo "upstream $APP { server 127.0.0.1:$PORT; }" > $DOKKU_ROOT/$APP/nginx.conf