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