From e93bb182c0309e29af74e73b476e785ff41854e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jadyn=20Emma=20J=C3=A4ger?= Date: Thu, 1 May 2025 14:16:39 +0200 Subject: [PATCH] fix: Unset -e during nc command --- roles/lego/files/lego_run.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/roles/lego/files/lego_run.sh b/roles/lego/files/lego_run.sh index 5da78bf..a36c31c 100644 --- a/roles/lego/files/lego_run.sh +++ b/roles/lego/files/lego_run.sh @@ -8,7 +8,9 @@ if [[ -n "${LEGO_HTTP_FALLBACK_PORT:-}" ]]; then echo "nc not found (in PATH), exiting" exit 1 fi + set +e nc_exit_code=$(nc -z 127.0.0.1 $LEGO_HTTP_PORT); + set -e if [[ $nc_exit_code -eq 0 ]]; then LEGO_HTTP_PORT=$LEGO_HTTP_FALLBACK_PORT fi