aboutsummaryrefslogtreecommitdiff
path: root/package/ejabberd/S50ejabberd
diff options
context:
space:
mode:
authorGravatar Johan Oudinet <johan.oudinet@gmail.com>2015-01-12 10:32:20 +0100
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2015-02-03 10:23:39 +0100
commit8290f2ea112dac347e52a4e0ae8a71a6bb2dc86e (patch)
tree4b5953feaa672d3085a048ad0d3f34c94fba11b7 /package/ejabberd/S50ejabberd
parent527aaf08cca0e9b74cb3c13ce87802a603010793 (diff)
downloadbuildroot-8290f2ea112dac347e52a4e0ae8a71a6bb2dc86e.tar.gz
buildroot-8290f2ea112dac347e52a4e0ae8a71a6bb2dc86e.tar.bz2
ejabberd: new package.
[Thomas: - Adjust the comment about the dependency on erlang - Fix license to be 'GPLv2+ with OpenSSL exception' and not just 'GPLv2+' - Use double quotes instead of simple quotes in the .mk file. - Don't use the EJABBERD_MAKE_ENV variable, since it's not defined anywhere. - Remove the 0007-fix-init.patch patch, since we're not using the init script provided by ejabberd, and rename 0008-fix-install-permissions.patch to 0007-fix-install-permissions.patch.] Signed-off-by: Johan Oudinet <johan.oudinet@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/ejabberd/S50ejabberd')
-rw-r--r--package/ejabberd/S50ejabberd35
1 files changed, 35 insertions, 0 deletions
diff --git a/package/ejabberd/S50ejabberd b/package/ejabberd/S50ejabberd
new file mode 100644
index 0000000000..265630712d
--- /dev/null
+++ b/package/ejabberd/S50ejabberd
@@ -0,0 +1,35 @@
+#!/bin/sh
+#
+# Start/stop ejabberd
+#
+
+USER=ejabberd
+RUNDIR=/var/run/ejabberd
+
+mkrundir() {
+ install -d -o $USER -g $USER $RUNDIR
+}
+
+case "$1" in
+ start)
+ mkrundir
+ echo "Starting ejabberd..."
+ ejabberdctl start
+ ;;
+ stop)
+ echo -n "Stopping ejabberd... "
+ ejabberdctl stop > /dev/null
+ if [ $? -eq 3 ] || ejabberdctl stopped; then
+ echo "OK"
+ else
+ echo "failed"
+ fi
+ ;;
+ restart|reload)
+ "$0" stop
+ "$0" start
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart}"
+ exit 1
+esac