blob: 2749d09cf765c7792affbd315d8cf400743705d5 (
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
39
40
41
42
43
44
|
#!/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 \
# --chuid ${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 $?
}
|