Add a dokku trace command to allow easy toggling of the DOKKU_TRACE option
This commit is contained in:
1 parent
39912ce5db
commit
b9b9d6303a
1 file changed
+18
@@ -2,6 +2,24 @@
|
|||||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
trace)
|
||||||
|
[[ -d $DOKKU_ROOT/.dokkurc ]] || mkdir -p $DOKKU_ROOT/.dokkurc
|
||||||
|
[[ "$2" == "on" ]] || [[ "$2" == "off" ]] || {
|
||||||
|
echo "Valid trace options are [on/off]"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
if [[ "$2" == "on" ]]; then
|
||||||
|
echo "Enabling dokku trace"
|
||||||
|
echo "export DOKKU_TRACE=1" > $DOKKU_ROOT/.dokkurc/DOKKU_TRACE
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$2" == "off" ]]; then
|
||||||
|
echo "Disabling dokku trace"
|
||||||
|
rm -f $DOKKU_ROOT/.dokkurc/DOKKU_TRACE
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
delete)
|
delete)
|
||||||
dokku apps:destroy $2
|
dokku apps:destroy $2
|
||||||
;;
|
;;
|
||||||
|
|||||||
Reference in new issue
Block a user