diff options
Diffstat (limited to 'initscript_openrc')
-rw-r--r-- | initscript_openrc | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/initscript_openrc b/initscript_openrc new file mode 100644 index 000000000000..b40d3ffb67e6 --- /dev/null +++ b/initscript_openrc @@ -0,0 +1,29 @@ +#!/usr/bin/openrc-run +# OpenRC wwwoffle script + +## The WWWOFFLE_ARGS environment variable should be set within /etc/conf.d/wwwoffle! + +_DAEMON="/usr/sbin/wwwoffled" +_DAEMON_ARGS=( + ${WWWOFFLE_ARGS} + ) + +depend() { + use logger dns +} + +start() { + ebegin "Starting $(basename "${_DAEMON}"): Executing ${_DAEMON} ${_DAEMON_ARGS[@]}" + + start-stop-daemon --start --quiet --exec "${_DAEMON}" -- "${_DAEMON_ARGS[@]}" + + eend "$?" +} + +stop() { + ebegin "Stopping $(basename "${_DAEMON}")" + + start-stop-daemon --stop --quiet --exec "${_DAEMON}" + + eend "$?" +} |