mirror of
https://github.com/hackacad/bastille.git
synced 2026-03-23 18:35:04 +01:00
Merge pull request #1386 from BastilleBSD/tschettervictor-patch-1
monitor: monitor file check is too early
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user