aports/testing/prosody/prosody.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

45 lines
869 B
Plaintext

#!/sbin/runscript
# Sample init.d file for alpine linux.
NAME=prosody
DAEMON=/usr/bin/$NAME
depend() {
need net
after firewall
}
start() {
ebegin "Starting ${NAME}"
/usr/bin/prosodyctl start
# start-stop-daemon --start --quiet --background \
# --make-pidfile --pidfile /var/run/${NAME}/${NAME}.pid \
# --user ${USER}:${GROUP} \
# --exec ${DAEMON} -- ${OPTS}
eend $?
}
stop() {
ebegin "Stopping ${NAME}"
/usr/bin/prosodyctl stop
# start-stop-daemon --stop --quiet \
# --exec ${DAEMON} \
# --pidfile /var/run/${NAME}/${NAME}.pid \
eend $?
}
reload() {
ebegin "Reloading ${NAME}"
if ! service_started "${NAME}" ; then
eend 1 "${NAME} is not started"
return 1
fi
/usr/bin/prosodyctl stop
/usr/bin/prosodyctl start
# start-stop-daemon --stop --oknodo --signal HUP \
# --exec ${DAEMON} --pidfile /var/run/${NAME}/${NAME}.pid
eend $?
}