summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Volkov <pva@gentoo.org>2009-04-09 05:40:39 +0000
committerPeter Volkov <pva@gentoo.org>2009-04-09 05:40:39 +0000
commit664830f8a33ed120038eab90a604415af8fce30c (patch)
treec4bd8b46361d59281ac1cfd33cc29c31c5b2bf63 /net-im/ejabberd/files/ejabberdctl-wrapper-2.template
parentAdd missing dep on sys-apps/miscfiles. bug 262291 by Jeroen Roovers (diff)
downloadgentoo-2-664830f8a33ed120038eab90a604415af8fce30c.tar.gz
gentoo-2-664830f8a33ed120038eab90a604415af8fce30c.tar.bz2
gentoo-2-664830f8a33ed120038eab90a604415af8fce30c.zip
Version bump, bug #265341 thank candrews for report and Vadim Efimov for this work.
(Portage version: 2.2_rc28/cvs/Linux i686)
Diffstat (limited to 'net-im/ejabberd/files/ejabberdctl-wrapper-2.template')
-rw-r--r--net-im/ejabberd/files/ejabberdctl-wrapper-2.template30
1 files changed, 30 insertions, 0 deletions
diff --git a/net-im/ejabberd/files/ejabberdctl-wrapper-2.template b/net-im/ejabberd/files/ejabberdctl-wrapper-2.template
new file mode 100644
index 000000000000..6443678cf9b2
--- /dev/null
+++ b/net-im/ejabberd/files/ejabberdctl-wrapper-2.template
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+[ -f /etc/conf.d/ejabberd ] && . /etc/conf.d/ejabberd
+
+if [ -r /var/run/jabber/.erlang.cookie ] ; then
+ HOME=/var/run/jabber
+ export HOME
+fi
+
+ERL=/usr/bin/erl
+
+if [ $# -ne 0 ] ; then
+ case $1 in
+ --node) shift ; EJABBERD_NODE=$1 ; shift ;;
+ esac
+fi
+
+if [ "$EJABBERD_NODE" = "${EJABBERD_NODE%.*}" ] ; then
+ SNAME=-sname
+else
+ SNAME=-name
+fi
+
+exec $ERL $SNAME ejabberdctl \
+ -pa /usr/@libdir@/erlang/lib/ejabberd-@version@/ebin \
+ -s ejabberd_ctl \
+ -noinput \
+ -extra $EJABBERD_NODE "$@"
+
+