From bbbe0e763d5ac47b5aa7b00de67005b6e0cb7ebb 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 78f5cae59..4990a7d8e 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 8e3086210..ed637bd96 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 b7de63b37..40565f897 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 7b522d76f..698d97788 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