bd31af2533 2020-04-10 1: # vim:ft=make:
bd31af2533 2020-04-10 2:
bd31af2533 2020-04-10 3: # command to start service
bd31af2533 2020-04-10 4: DAEMON_example_COMMAND?=/path/service
bd31af2533 2020-04-10 5:
bd31af2533 2020-04-10 6: # flags to force daemonizing
bd31af2533 2020-04-10 7: DAEMON_example_BACKGROUND?=
bd31af2533 2020-04-10 8:
bd31af2533 2020-04-10 9: # enabled by default?
bd31af2533 2020-04-10 10: DAEMON_example_ENABLE?=no
bd31af2533 2020-04-10 11:
bd31af2533 2020-04-10 12: # general service flags
bd31af2533 2020-04-10 13: DAEMON_example_FLAGS?=
bd31af2533 2020-04-10 14:
bd31af2533 2020-04-10 15: # flags to prevent daemonizing
bd31af2533 2020-04-10 16: DAEMON_example_FOREGROUND?=
bd31af2533 2020-04-10 17:
bd31af2533 2020-04-10 18: # group to run service as
bd31af2533 2020-04-10 19: DAEMON_example_GROUP?=wheel
bd31af2533 2020-04-10 20:
bd31af2533 2020-04-10 21: # kernel modules to load prior to service start
bd31af2533 2020-04-10 22: DAEMON_example_MODULES?=
bd31af2533 2020-04-10 23:
bd31af2533 2020-04-10 24: # user to run service as
bd31af2533 2020-04-10 25: DAEMON_example_USER?=root
bd31af2533 2020-04-10 26:
bd31af2533 2020-04-10 27: # extra commands to execute before starting service
bd31af2533 2020-04-10 28: # _earlyservice - starts after root mount appear
bd31af2533 2020-04-10 29: # _service - doesn't required for early boot
bd31af2533 2020-04-10 30: # you also can select specific starter by inheriting class by full name:
bd31af2533 2020-04-10 31: # _(daemon|plain|svc)_(early)?service
bd31af2533 2020-04-10 32: example: _earlyservice
bd31af2533 2020-04-10 33: test -n "$${DAEMON_$@_ENABLE}" || echo service is always execute
bd31af2533 2020-04-10 34:
bd31af2533 2020-04-10 35: # you can't be sure whether service is enabled on the first run, when future
bd31af2533 2020-04-10 36: # targets are only assembled, as service can be enabled later in the chain
bd31af2533 2020-04-10 37: # somake sure to check whether service is enabled in scripts you are running
bd31af2533 2020-04-10 38: # not in make constructs