diff --git a/dokku b/dokku index 95b214a2b..d4c985131 100755 --- a/dokku +++ b/dokku @@ -1,7 +1,11 @@ #!/usr/bin/env bash -set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x -export PLUGIN_PATH=${PLUGIN_PATH:="/var/lib/dokku/plugins"} +set -eo pipefail export DOKKU_ROOT=${DOKKU_ROOT:="/home/dokku"} +export PLUGIN_PATH=${PLUGIN_PATH:="/var/lib/dokku/plugins"} + +[[ -f $DOKKU_ROOT/dokkurc ]] && source $DOKKU_ROOT/dokkurc + +[[ $DOKKU_TRACE ]] && set -x case "$1" in receive) diff --git a/plugins/00_dokku-standard/commands b/plugins/00_dokku-standard/commands index 81e36aefa..37196a374 100755 --- a/plugins/00_dokku-standard/commands +++ b/plugins/00_dokku-standard/commands @@ -1,5 +1,5 @@ #!/usr/bin/env bash -set -eo pipefail +set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x case "$1" in delete) if [[ -z $2 ]]; then diff --git a/plugins/00_dokku-standard/install b/plugins/00_dokku-standard/install index b8485b4d3..90d894b4b 100755 --- a/plugins/00_dokku-standard/install +++ b/plugins/00_dokku-standard/install @@ -1,5 +1,5 @@ #!/usr/bin/env bash -set -eo pipefail +set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x sed -i 's/docker -d$/docker -d -r=true/' /etc/init/docker.conf diff --git a/plugins/00_dokku-standard/post-delete b/plugins/00_dokku-standard/post-delete index 10c573421..6b6829284 100755 --- a/plugins/00_dokku-standard/post-delete +++ b/plugins/00_dokku-standard/post-delete @@ -1,3 +1,3 @@ #!/usr/bin/env bash -set -eo pipefail +set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x [[ -n $1 ]] && rm -r "$DOKKU_ROOT/$1" > /dev/null diff --git a/plugins/config/commands b/plugins/config/commands index 6061698b8..a8ddf4802 100755 --- a/plugins/config/commands +++ b/plugins/config/commands @@ -1,5 +1,5 @@ #!/usr/bin/env bash -set -eo pipefail +set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x # Check if name is specified if [[ $1 == config ]] || [[ $1 == config:* ]]; then diff --git a/plugins/git/commands b/plugins/git/commands index 14121d5c1..22290bab5 100755 --- a/plugins/git/commands +++ b/plugins/git/commands @@ -1,5 +1,5 @@ #!/usr/bin/env bash -set -eo pipefail +set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x case "$1" in git-hook) diff --git a/plugins/nginx-vhosts/commands b/plugins/nginx-vhosts/commands index 143aedbc2..99e5dbeff 100755 --- a/plugins/nginx-vhosts/commands +++ b/plugins/nginx-vhosts/commands @@ -1,3 +1,3 @@ #!/usr/bin/env bash -set -eo pipefail +set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x cat diff --git a/plugins/nginx-vhosts/install b/plugins/nginx-vhosts/install index 0bd576943..a62d4505a 100755 --- a/plugins/nginx-vhosts/install +++ b/plugins/nginx-vhosts/install @@ -1,5 +1,5 @@ #!/usr/bin/env bash -set -eo pipefail +set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x # latest stable NGINX 1.4.x with websocket support add-apt-repository -y ppa:nginx/stable diff --git a/plugins/nginx-vhosts/post-delete b/plugins/nginx-vhosts/post-delete index 2f3d05b39..fe7516c4b 100755 --- a/plugins/nginx-vhosts/post-delete +++ b/plugins/nginx-vhosts/post-delete @@ -1,3 +1,3 @@ #!/usr/bin/env bash -set -eo pipefail -sudo /etc/init.d/nginx reload > /dev/null \ No newline at end of file +set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x +sudo /etc/init.d/nginx reload > /dev/null diff --git a/plugins/nginx-vhosts/post-deploy b/plugins/nginx-vhosts/post-deploy index 7c2a04c62..ee3f440f3 100755 --- a/plugins/nginx-vhosts/post-deploy +++ b/plugins/nginx-vhosts/post-deploy @@ -1,5 +1,5 @@ #!/usr/bin/env bash -set -eo pipefail +set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x APP="$1"; PORT="$2" WILDCARD_SSL="$DOKKU_ROOT/ssl" SSL="$DOKKU_ROOT/$APP/ssl"