From 0a2a24fa6b2d18d7b53188bf0c6f68813453ed74 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sat, 1 Jul 2023 06:57:57 -0400 Subject: [PATCH] fix: do not start proxy implementations during server restore if they weren't manually started via the :start command This change ensures users don't have unnecessary proxies starting on their servers and potentially have apps not routing correctly due to another proxy squatting on a port. Closes #5846 --- plugins/caddy-vhosts/pre-restore | 2 +- plugins/haproxy-vhosts/pre-restore | 2 +- plugins/nginx-vhosts/pre-restore | 2 +- plugins/traefik-vhosts/pre-restore | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/caddy-vhosts/pre-restore b/plugins/caddy-vhosts/pre-restore index 78f5cae59f2..4990a7d8e94 100755 --- a/plugins/caddy-vhosts/pre-restore +++ b/plugins/caddy-vhosts/pre-restore @@ -8,7 +8,7 @@ trigger-caddy-pre-restore() { declare desc="pre-restore the caddy proxy" declare trigger="install" - if [[ "$(fn-plugin-property-get "caddy" "--global" "proxy-status")" == "stopped" ]]; then + if [[ "$(fn-plugin-property-get "caddy" "--global" "proxy-status")" != "started" ]]; then return fi diff --git a/plugins/haproxy-vhosts/pre-restore b/plugins/haproxy-vhosts/pre-restore index 8e30862109a..ed637bd9676 100755 --- a/plugins/haproxy-vhosts/pre-restore +++ b/plugins/haproxy-vhosts/pre-restore @@ -8,7 +8,7 @@ trigger-haproxy-pre-restore() { declare desc="pre-restore the caddy proxy" declare trigger="install" - if [[ "$(fn-plugin-property-get "haproxy" "--global" "proxy-status")" == "stopped" ]]; then + if [[ "$(fn-plugin-property-get "haproxy" "--global" "proxy-status")" != "started" ]]; then return fi diff --git a/plugins/nginx-vhosts/pre-restore b/plugins/nginx-vhosts/pre-restore index b7de63b375b..40565f89786 100755 --- a/plugins/nginx-vhosts/pre-restore +++ b/plugins/nginx-vhosts/pre-restore @@ -8,7 +8,7 @@ trigger-nginx-pre-restore() { declare desc="pre-restore the nginx proxy" declare trigger="install" - if [[ "$(fn-plugin-property-get "nginx" "--global" "proxy-status")" == "stopped" ]]; then + if [[ "$(fn-plugin-property-get "nginx" "--global" "proxy-status")" != "started" ]]; then return fi diff --git a/plugins/traefik-vhosts/pre-restore b/plugins/traefik-vhosts/pre-restore index 7b522d76f4d..698d97788df 100755 --- a/plugins/traefik-vhosts/pre-restore +++ b/plugins/traefik-vhosts/pre-restore @@ -8,7 +8,7 @@ trigger-traefik-pre-restore() { declare desc="pre-restore the traefik proxy" declare trigger="install" - if [[ "$(fn-plugin-property-get "traefik" "--global" "proxy-status")" == "stopped" ]]; then + if [[ "$(fn-plugin-property-get "traefik" "--global" "proxy-status")" != "started" ]]; then return fi