Files
dokku/plugins/config/commands
2015-09-01 14:30:32 -04:00

49 lines
1.0 KiB
Bash
Executable File

#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_PATH/common/functions"
source "$PLUGIN_PATH/config/functions"
case "$1" in
config)
config_all "$@"
;;
config:get)
config_get "$@"
;;
config:set)
config_set "$@"
;;
config:unset)
config_unset "$@"
;;
config:set-norestart)
dokku_log_info2 "$1 is deprecated as of v0.3.22"
shift 1
dokku config:set --no-restart "$@"
;;
config:unset-norestart)
dokku_log_info2 "$1 is deprecated as of v0.3.22"
shift 1
dokku config:unset --no-restart "$@"
;;
help | config:help)
cat && cat<<EOF
config (<app>|--global), Display all global or app-specific config vars
config:get (<app>|--global) KEY, Display a global or app-specific config value
config:set (<app>|--global) KEY1=VALUE1 [KEY2=VALUE2 ...], Set one or more config vars
config:unset (<app>|--global) KEY1 [KEY2 ...], Unset one or more config vars
EOF
;;
*)
exit $DOKKU_NOT_IMPLEMENTED_EXIT
;;
esac