From a331d27945470e40b284feebc986d2470cc191a4 Mon Sep 17 00:00:00 2001 From: Udi Oron Date: Sat, 1 Feb 2025 20:52:08 +0200 Subject: [PATCH] feat(nginx-vhosts): add support for custom nginx service command --- plugins/nginx-vhosts/internal-functions | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/nginx-vhosts/internal-functions b/plugins/nginx-vhosts/internal-functions index 90a77fb42..5485c345a 100755 --- a/plugins/nginx-vhosts/internal-functions +++ b/plugins/nginx-vhosts/internal-functions @@ -729,9 +729,13 @@ fn-nginx-vhosts-nginx-is-running() { fn-nginx-vhosts-nginx-init-cmd() { declare desc="start nginx for given distros" declare CMD="$1" - local NGINX_INIT_NAME - NGINX_INIT_NAME=nginx + if [[ -n "$DOKKU_NGINX_CUSTOM_CMD" ]]; then + $DOKKU_NGINX_CUSTOM_CMD $CMD + return + fi + + local NGINX_INIT_NAME=nginx if fn-nginx-vhosts-uses-openresty; then NGINX_INIT_NAME=openresty fi