diff options
Diffstat (limited to 'testing/prosody/prosody.initd')
-rw-r--r-- | testing/prosody/prosody.initd | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/testing/prosody/prosody.initd b/testing/prosody/prosody.initd new file mode 100644 index 0000000000..1c88672bce --- /dev/null +++ b/testing/prosody/prosody.initd @@ -0,0 +1,43 @@ +#!/sbin/runscript + +# Sample init.d file for alpine linux. + +NAME=prosody +DAEMON=/usr/bin/$NAME + +depend() { + need net +} + +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 $? +} + |