Files
dokku/plugins/nginx-vhosts/proxy-clear-config
2020-02-28 06:03:53 -05:00

20 lines
643 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/nginx-vhosts/internal-functions"
trigger-nginx-vhosts-proxy-clear-config() {
declare desc="clear nginx config for proxy app containers from command line"
declare trigger="proxy-clear-config"
declare APP="$1"
[[ -z "$APP" ]] && dokku_log_fail "Please specify an app to run the command on"
if [[ "$(plugn trigger proxy-type "$APP")" == "nginx" ]]; then
plugn trigger network-clear-config "$APP"
nginx_clear_config "$APP"
fi
}
trigger-nginx-vhosts-proxy-clear-config "$@"