Enable tracing in hooks when DOKKU_TRACE is set.

This makes it much easier to debug plugins.
Also source the 'dokkurc' file when starting dokku. This makes it easy
to define DOKKU_TRACE over ssh.
This commit is contained in:
Paul Lietar committed 2013-11-18 20:59:48 +00:00
1 parent 805c5a27c6
commit 83ce81fc51
10 files changed
+16 -12

No files matched your search

+6 -2
View File
@@ -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)