Files
dokku/plugins/nginx-vhosts/proxy-enable
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
470 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-enable() {
declare desc="enable nginx proxy"
declare trigger="proxy-enable"
declare APP="$1"
verify_app_name "$APP"
if [[ "$(plugn trigger proxy-type "$APP")" == "nginx" ]]; then
plugn trigger domains-enable "$APP" "false"
plugn trigger app-restart "$APP"
fi
}
trigger-nginx-vhosts-proxy-enable "$@"