aboutsummaryrefslogtreecommitdiffstats
path: root/testing/prosody/prosody.initd
diff options
context:
space:
mode:
authorMichael Mason <ms13sp@gmail.com>2009-06-08 15:00:56 +0000
committerMichael Mason <ms13sp@gmail.com>2009-06-08 15:00:56 +0000
commitf9b478494e821804a3c5cee3912a1f970c2b7ca3 (patch)
tree0c7b35640c839161b32c82e34746f1ab14835e61 /testing/prosody/prosody.initd
parentaf73d3395ad713e014efb49fc60b0c9d99a11e1f (diff)
downloadaports-f9b478494e821804a3c5cee3912a1f970c2b7ca3.tar.bz2
aports-f9b478494e821804a3c5cee3912a1f970c2b7ca3.tar.xz
unstable/prosody move to testing/prosody
Diffstat (limited to 'testing/prosody/prosody.initd')
-rw-r--r--testing/prosody/prosody.initd43
1 files changed, 43 insertions, 0 deletions
diff --git a/testing/prosody/prosody.initd b/testing/prosody/prosody.initd
new file mode 100644
index 000000000..1c88672bc
--- /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 $?
+}
+