blob: c6b2bf215c1a8436e19bfb1ef9b61ad14c66ba2e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
#!/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}
)
extra_started_commands="reload"
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 "$?"
}
reload() {
ebegin "Re-reading configuration file for $(basename "${_DAEMON}")"
wwwoffle "${_DAEMON_ARGS[@]}" -config
eend "$?"
}
|