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:
@@ -147,8 +147,8 @@ platform_is_maintenance_running() {
|
|||||||
# ──────────────────────────────────────────────────────────────────────────────────────────────
|
# ──────────────────────────────────────────────────────────────────────────────────────────────
|
||||||
platform_is_service_enabled() {
|
platform_is_service_enabled() {
|
||||||
case "$1" in
|
case "$1" in
|
||||||
docker) grep -q '^DOCKER_ENABLED=yes' /boot/config/docker.cfg 2>/dev/null ;;
|
docker) grep -qE '^DOCKER_ENABLED="?yes"?' /boot/config/docker.cfg 2>/dev/null ;;
|
||||||
libvirt) grep -q '^DOMAIN_ENABLE=yes' /boot/config/domain.cfg 2>/dev/null ;;
|
libvirt) grep -q '^SERVICE="enable"' /boot/config/domain.cfg 2>/dev/null ;;
|
||||||
*) return 1 ;;
|
*) return 1 ;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user