Fix platform_is_service_enabled to match Unraid's actual cfg format

Unraid quotes values (DOCKER_ENABLED="yes") and uses SERVICE="enable" for
libvirt — the old patterns matched nothing, so docker_watchdog always skipped.
This commit is contained in:
Gmer4Lfe
2026-06-27 12:34:12 -04:00
parent d8e3732f8d
commit ef7bc127b6
+2 -2
View File
@@ -147,8 +147,8 @@ platform_is_maintenance_running() {
# ──────────────────────────────────────────────────────────────────────────────────────────────
platform_is_service_enabled() {
case "$1" in
docker) grep -q '^DOCKER_ENABLED=yes' /boot/config/docker.cfg 2>/dev/null ;;
libvirt) grep -q '^DOMAIN_ENABLE=yes' /boot/config/domain.cfg 2>/dev/null ;;
docker) grep -qE '^DOCKER_ENABLED="?yes"?' /boot/config/docker.cfg 2>/dev/null ;;
libvirt) grep -q '^SERVICE="enable"' /boot/config/domain.cfg 2>/dev/null ;;
*) return 1 ;;
esac
}