From e2d215ab4faee6fd4765cf4fd993c3069d82e7fa Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Wed, 30 Nov 2022 01:43:14 -0500 Subject: [PATCH] fix: do not run enable/disable when using init.d init.d doesn't support these two commands, causing nginx:stop/nginx:start to fail. --- plugins/nginx-vhosts/internal-functions | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/nginx-vhosts/internal-functions b/plugins/nginx-vhosts/internal-functions index ff00477b7..7a6ae1e79 100755 --- a/plugins/nginx-vhosts/internal-functions +++ b/plugins/nginx-vhosts/internal-functions @@ -134,6 +134,8 @@ fn-nginx-vhosts-nginx-init-cmd() { sudo /usr/bin/sv "$CMD" "$NGINX_INIT_NAME" elif [[ -x /usr/bin/systemctl ]]; then sudo /usr/bin/systemctl "$CMD" "$NGINX_INIT_NAME" + elif [[ "$CMD" == "enable" ]] || [[ "$CMD" == "disable" ]]; then + dokku_log_warn "Running $CMD is not possible for init.d managed services" else sudo "/etc/init.d/$NGINX_INIT_NAME" "$CMD" fi