From 49034a683ba0920d07b91d1f24e1a201fba09c7c Mon Sep 17 00:00:00 2001 From: tschettervictor <85497460+tschettervictor@users.noreply.github.com> Date: Tue, 23 Dec 2025 22:30:50 -0700 Subject: [PATCH] monitor: monitor file check is too early --- usr/local/share/bastille/monitor.sh | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/usr/local/share/bastille/monitor.sh b/usr/local/share/bastille/monitor.sh index 2bbf76bc..ee09edcf 100644 --- a/usr/local/share/bastille/monitor.sh +++ b/usr/local/share/bastille/monitor.sh @@ -120,13 +120,8 @@ for jail in ${JAILS}; do bastille_jail_monitor="${bastille_jailsdir}/${jail}/monitor" - # Skip if jail is not running or no monitor file - if ! check_target_is_running "${jail}" || [ ! -f "${bastille_jail_monitor}" ]; then - continue - fi - ## iterate service(s) and check service status; restart on failure - if [ -z "${ACTION}" ] && [ -f "${bastille_jail_monitor}" ]; then + if ! check_target_is_running "${jail}" && [ -z "${ACTION}" ] && [ -f "${bastille_jail_monitor}" ]; then for service in $(xargs < "${bastille_jail_monitor}"); do ## check service status if ! jexec -l -U root "${jail}" service "${service}" status >/dev/null 2>/dev/null; then