Files
dokku/plugins/config/functions

30 lines
817 B
Bash
Executable File

#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
config_export() {
declare desc="returns export command for config variable of specified type (app/global)"
local CONFIG_TYPE="$1"
local APP="$2"
if [[ $CONFIG_TYPE == "global" ]]; then
APP="--global"
fi
$PLUGIN_AVAILABLE_PATH/config/subcommands/export config:export "$APP"
return 0
}
config_get() {
declare desc="get value of given config var"
$PLUGIN_AVAILABLE_PATH/config/subcommands/get config:get "$@"
}
config_set() {
declare desc="set value of given config var"
$PLUGIN_AVAILABLE_PATH/config/subcommands/set config:set "$@"
}
config_unset() {
declare desc="set value of given config var"
$PLUGIN_AVAILABLE_PATH/config/subcommands/unset config:unset "$@"
}