91faa22c52
parameter to daemonize, move the parameter from daemon to daemon_flags, so that the user cannot inadvertently prevent it from daemonizing by adjusting the flags. Discussed with ajacoutot and schwarze, this method was suggested by schwarze@ as a simpler alternative to my diff. ok aja@
21 lines
362 B
Bash
21 lines
362 B
Bash
#!/bin/sh
|
|
#
|
|
# $OpenBSD: yaws.rc,v 1.6 2011/12/17 22:01:13 sthen Exp $
|
|
|
|
daemon="${TRUEPREFIX}/bin/yaws --daemon"
|
|
daemon_flags="--conf ${SYSCONFDIR}/yaws/yaws.conf"
|
|
|
|
. /etc/rc.d/rc.subr
|
|
|
|
pexp="${LOCALBASE}/lib/erlang/erts.*${TRUEPREFIX}/lib/yaws/ebin -run yaws"
|
|
|
|
rc_reload() {
|
|
${rcexec} "${daemon} --hup"
|
|
}
|
|
|
|
rc_stop() {
|
|
${rcexec} "${daemon} --stop"
|
|
}
|
|
|
|
rc_cmd $1
|