2016-02-14 18:43:40 -08:00
|
|
|
#!/usr/bin/env bash
|
2019-01-07 01:04:17 -05:00
|
|
|
set -eo pipefail
|
|
|
|
|
[[ $DOKKU_TRACE ]] && set -x
|
2016-02-14 18:43:40 -08:00
|
|
|
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
2018-02-24 14:45:52 -05:00
|
|
|
source "$PLUGIN_AVAILABLE_PATH/domains/functions"
|
2017-02-20 20:11:53 -07:00
|
|
|
source "$PLUGIN_AVAILABLE_PATH/ps/functions"
|
2016-02-14 18:43:40 -08:00
|
|
|
|
2020-02-10 02:40:59 -05:00
|
|
|
trigger-nginx-vhosts-proxy-disable() {
|
2016-03-08 15:30:34 -05:00
|
|
|
declare desc="disable nginx proxy"
|
2020-02-10 02:40:59 -05:00
|
|
|
declare trigger="proxy-disable"
|
|
|
|
|
declare APP="$1"
|
2016-02-14 18:43:40 -08:00
|
|
|
|
2020-02-10 02:40:59 -05:00
|
|
|
verify_app_name "$APP"
|
2020-02-22 06:35:30 -05:00
|
|
|
if [[ "$(plugn trigger proxy-type "$APP")" == "nginx" ]]; then
|
2016-02-22 10:16:57 -08:00
|
|
|
disable_app_vhost "$APP" --no-restart
|
|
|
|
|
ps_restart "$APP"
|
2016-02-14 18:43:40 -08:00
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
2020-02-10 02:40:59 -05:00
|
|
|
trigger-nginx-vhosts-proxy-disable "$@"
|