# Example: task with a runtime condition.
#
# A 'task' may run for any duration but is expected to eventually
# exit cleanly. Unlike 'oneshot', tasks aren't expected to exit
# immediately. Unlike 'daemon', tasks never restart.
#
# The [condition] block declares pre-flight checks. If any condition
# fails at startup, the service enters STATE_SKIPPED without forking —
# no failure, no restart loop. Useful for platform probes.

[service]
type = "task"
description = "ACPI hotplug daemon (skipped on platforms without ACPI)"

[exec]
start = "/usr/sbin/example-acpihpd"

[condition]
# This file must exist for the service to start. If missing, the
# service is SKIPPED with reason "missing /dev/acpi".
exists_file = "/dev/acpi"

# Alternative form: at least one of these paths must exist (OR semantics
# across the list, AND with other condition keys).
# exists_file_any = ["/dev/acpi", "/dev/acpihp"]

# A command that must exit 0 (5-second timeout). Useful for richer
# probes than file existence — e.g., checking a hardware flag.
# command = "/usr/sbin/example-acpihpd --probe"
