2026-04-24 02:10:30 -04:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
|
|
|
|
|
source "$PLUGIN_AVAILABLE_PATH/nginx-vhosts/functions"
|
|
|
|
|
set -eo pipefail
|
|
|
|
|
[[ $DOKKU_TRACE ]] && set -x
|
|
|
|
|
|
|
|
|
|
trigger-nginx-vhosts-post-create() {
|
|
|
|
|
declare desc="nginx-vhosts post-create trigger"
|
|
|
|
|
declare trigger="post-create"
|
|
|
|
|
declare APP="$1"
|
|
|
|
|
|
|
|
|
|
fn-plugin-property-setup-app "nginx" "$APP"
|
|
|
|
|
|
|
|
|
|
if [[ "$(plugn trigger proxy-type "$APP")" != "nginx" ]]; then
|
|
|
|
|
return
|
|
|
|
|
fi
|
|
|
|
|
|
2026-04-24 04:14:49 -04:00
|
|
|
if [[ "$(fn-plugin-property-get "nginx" "--global" "proxy-status")" == "stopped" ]]; then
|
|
|
|
|
return
|
|
|
|
|
fi
|
|
|
|
|
|
2026-04-24 02:10:30 -04:00
|
|
|
nginx_build_config "$APP"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
trigger-nginx-vhosts-post-create "$@"
|