summarylogtreecommitdiffstats
path: root/initscript_openrc
blob: b40d3ffb67e674d5d52e16ba1402590c962619dc (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
#!/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 "$?"
}