subcommand restructure and bashstyle refactor. closes #1579

This commit is contained in:
Michael S. Hobbs
2016-03-01 13:26:35 -08:00
committed by Michael Hobbs
parent 76e27f0333
commit 89f289b433
105 changed files with 1969 additions and 1306 deletions

View File

@@ -1,29 +1,8 @@
#!/usr/bin/env bash
[[ " proxy proxy:set proxy:enable proxy:disable help proxy:help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT"
[[ " help proxy:help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT"
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/proxy/functions"
case "$1" in
proxy)
proxy_main "$2"
;;
proxy:set)
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
proxy_set "$2"
;;
proxy:enable)
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
proxy_enable "$2" --no-restart
;;
proxy:disable)
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
proxy_disable "$2" --no-restart
;;
help | proxy:help)
cat<<EOF
proxy <app>, Show proxy for app