716b0393df 2019-10-21 arcade: LOCAL_TARGETS:=_daemon_svc _service_svc
716b0393df 2019-10-21 arcade: OTHER_TARGETS+=${LOCAL_TARGETS}
716b0393df 2019-10-21 arcade: .if ${DAEMONIZER} == "svc"
716b0393df 2019-10-21 arcade: LOCAL_TARGETS:=${LOCAL_TARGETS} ${LOCAL_TARGETS:S/_svc//}
716b0393df 2019-10-21 arcade: .endif
716b0393df 2019-10-21 arcade:
716b0393df 2019-10-21 arcade: .for target in ${LOCAL_TARGETS}
716b0393df 2019-10-21 arcade: ${target}: ${target:M_daemon:DDAEMON} .USE
716b0393df 2019-10-21 arcade: #.export DAEMON_$@_ENABLE
716b0393df 2019-10-21 arcade: env | grep $@
716b0393df 2019-10-21 arcade: test -z "$${DAEMON_$@_ENABLE}" || { \
716b0393df 2019-10-21 arcade: test -n "${DAEMON_$@_MODULES}" && kldload -n ${DAEMON_$@_MODULES} || true; \
716b0393df 2019-10-21 arcade: svc -u ${DAEMON_$@_USER:Uroot} -g ${DAEMON_$@_GROUP:Uwheel} init $@ ${DAEMON_$@_COMMAND} ${DAEMON_$@_FLAGS}; \
716b0393df 2019-10-21 arcade: }
716b0393df 2019-10-21 arcade: .endfor
716b0393df 2019-10-21 arcade:
716b0393df 2019-10-21 arcade: #_service: .USE
716b0393df 2019-10-21 arcade: #.export DAEMON_$@_ENABLE
716b0393df 2019-10-21 arcade: # env | grep $@
716b0393df 2019-10-21 arcade: # test -z "$${DAEMON_$@_ENABLE}" || { \
716b0393df 2019-10-21 arcade: # test -n "${DAEMON_$@_MODULES}" && kldload -n ${DAEMON_$@_MODULES} || true; \
716b0393df 2019-10-21 arcade: # svc -u ${DAEMON_$@_USER:Uroot} -g ${DAEMON_$@_GROUP:Uwheel} init $@ ${DAEMON_$@_COMMAND} ${DAEMON_$@_FLAGS}; \
716b0393df 2019-10-21 arcade: # }
716b0393df 2019-10-21 arcade:
716b0393df 2019-10-21 arcade: .undef LOCAL_TARGETS