From 64fc818fa7c4bf9b79f7fa11bf4f5e4192d67402 Mon Sep 17 00:00:00 2001 From: Christer Edwards Date: Fri, 18 Jul 2025 20:33:27 -0600 Subject: [PATCH] only attempt healthchecks URL if non-empty --- usr/local/share/bastille/monitor.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/usr/local/share/bastille/monitor.sh b/usr/local/share/bastille/monitor.sh index 4a17acf5..b1c36bf6 100644 --- a/usr/local/share/bastille/monitor.sh +++ b/usr/local/share/bastille/monitor.sh @@ -191,9 +191,11 @@ done # Final ping to healthcheck URL if [ "$SERVICE_FAILED" -eq 0 ]; then - curl -fsS --retry 3 "${bastille_monitor_healthchecks}" > /dev/null 2>&1 -else - curl -fsS --retry 3 "${bastille_monitor_healthchecks}/fail" > /dev/null 2>&1 + if [ -n "${bastille_monitor_healthchecks}" ]; then + curl -fsS --retry 3 "${bastille_monitor_healthchecks}" > /dev/null 2>&1 + else + curl -fsS --retry 3 "${bastille_monitor_healthchecks}/fail" > /dev/null 2>&1 + fi fi wait