aports/testing/cherokee/cherokee.initd
Jesse Young ae1967b66e Replace instances of "--chuid" to "--user" in initd scripts
Fixes #776

Signed-off-by: Jesse Young <jlyo@jlyo.org>
2011-12-01 07:15:51 +00:00

42 lines
768 B
Plaintext
Executable File

#!/sbin/runscript
# Cherokee init.d file for alpine linux.
NAME=cherokee
DAEMON=/usr/sbin/$NAME
DAEMON_USER=${DAEMON_USER:-root}
DAEMON_GROUP=${DAEMON_GROUP:-root}
depend() {
need net
}
start() {
ebegin "Starting ${NAME}"
start-stop-daemon --start --quiet \
--pidfile /var/run/${NAME}.pid \
--user ${DAEMON_USER}:${DAEMON_GROUP} \
--exec ${DAEMON} -- ${OPTS}
eend $?
}
stop() {
ebegin "Stopping ${NAME}"
start-stop-daemon --stop --quiet \
--exec ${DAEMON} \
--pidfile /var/run/${NAME}.pid
eend $?
}
reload() {
ebegin "Reloading ${NAME}"
if ! service_started "${NAME}" ; then
eend 1 "${NAME} is not started"
return 1
fi
start-stop-daemon --stop --oknodo --signal HUP \
--exec ${DAEMON} --pidfile /var/run/${NAME}.pid
eend $?
}