Files
dokku/plugins/nginx-vhosts/proxy-disable
Jose Diaz-Gonzalez 61a306664f refactor: move domain manipulation into triggers
This allows other plugins to avoid understanding the underlying details of how domains might be integrated with.
2020-05-06 00:16:51 -04:00

19 lines
473 B
Bash
Executable File

#!/usr/bin/env bash
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
trigger-nginx-vhosts-proxy-disable() {
declare desc="disable nginx proxy"
declare trigger="proxy-disable"
declare APP="$1"
verify_app_name "$APP"
if [[ "$(plugn trigger proxy-type "$APP")" == "nginx" ]]; then
plugn trigger domains-disable "$APP" false
plugn trigger app-restart "$APP"
fi
}
trigger-nginx-vhosts-proxy-disable "$@"