fix(nginx): skip post-create config when nginx is stopped

When nginx is stopped (e.g. during traefik/caddy tests), the
post-create trigger should not attempt to build and reload the
nginx config as the service is not running.
This commit is contained in:
Jose Diaz-Gonzalez
2026-04-24 04:14:49 -04:00
parent fc7ddf34ba
commit dcce09f19f

View File

@@ -15,6 +15,10 @@ trigger-nginx-vhosts-post-create() {
return
fi
if [[ "$(fn-plugin-property-get "nginx" "--global" "proxy-status")" == "stopped" ]]; then
return
fi
nginx_build_config "$APP"
}