mirror of
https://github.com/dokku/dokku.git
synced 2025-12-29 00:25:08 +01:00
While I do not agree with _every_ style change, this will force Dokku to have consistent formatting across all shell scripts, which is arguably a Good Thing™. The command used to reprocess everything is: ```shell shfmt -l -bn -ci -i 2 -w . ```
27 lines
862 B
Bash
Executable File
27 lines
862 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -eo pipefail
|
|
[[ $DOKKU_TRACE ]] && set -x
|
|
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
|
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
|
source "$PLUGIN_AVAILABLE_PATH/proxy/functions"
|
|
|
|
proxy_disable_cmd() {
|
|
declare desc="disable proxy for app via command line"
|
|
local cmd="proxy:disable"
|
|
[[ -z $1 ]] && dokku_log_fail "Please specify an app to run the command on"
|
|
local APP="$1"
|
|
verify_app_name "$APP"
|
|
|
|
if [[ "$(is_app_proxy_enabled "$APP")" == "true" ]]; then
|
|
dokku_log_info1 "Disabling proxy for app ($APP)"
|
|
[[ "$2" == "--no-restart" ]] && local CONFIG_SET_ARGS=$2
|
|
# shellcheck disable=SC2086
|
|
config_set $CONFIG_SET_ARGS $APP DOKKU_DISABLE_PROXY=1
|
|
plugn trigger proxy-disable "$APP"
|
|
else
|
|
dokku_log_info1 "proxy is already disable for app ($APP)"
|
|
fi
|
|
}
|
|
|
|
proxy_disable_cmd "$2" --no-restart
|