safeguard: check Docker/VM Manager enabled before acting
common.sh: add is_docker_enabled() and is_vm_manager_enabled() helpers reading /boot/config/docker.cfg and /boot/config/domain.cfg. docker_watchdog: exit cleanly if Docker not enabled in Unraid settings. stability_watchdog: skip Docker daemon check and Docker container stop if Docker not enabled; skip virsh VM shutdown if VM Manager not enabled. server_reboot: skip VM shutdown and libvirt stop if VM Manager not enabled. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
fdba23c32d
commit
46b27f609a
@@ -240,6 +240,11 @@ acquire_lock
|
||||
# detect_hosts() sets MY_ID and aliases all HOST*_WATCHDOG_* arrays
|
||||
detect_hosts
|
||||
|
||||
if ! is_docker_enabled; then
|
||||
log "Docker not enabled in Unraid settings — skipping cycle"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if ! command -v docker >/dev/null 2>&1; then
|
||||
error "Docker not found — cannot start watchdog"
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user