diff options
-rw-r--r-- | net-im/ejabberd/ChangeLog | 12 | ||||
-rw-r--r-- | net-im/ejabberd/ejabberd-2.0.0-r1.ebuild | 151 | ||||
-rw-r--r-- | net-im/ejabberd/ejabberd-2.0.0.ebuild | 137 | ||||
-rw-r--r-- | net-im/ejabberd/files/2.0.0-ejab-542-mod_proxy65.patch | 12 | ||||
-rw-r--r-- | net-im/ejabberd/files/2.0.0-erlang12-s2s-in.patch | 35 | ||||
-rw-r--r-- | net-im/ejabberd/files/ejabberd-2.0.0.confd | 23 | ||||
-rw-r--r-- | net-im/ejabberd/files/ejabberd-2.0.0.initd | 47 | ||||
-rw-r--r-- | net-im/ejabberd/files/ejabberd-wrapper-2.0.0.template | 49 | ||||
-rw-r--r-- | net-im/ejabberd/files/ejabberdctl-wrapper-2.0.0.template | 30 |
9 files changed, 331 insertions, 165 deletions
diff --git a/net-im/ejabberd/ChangeLog b/net-im/ejabberd/ChangeLog index ada9bc21ed21..4920965e2ace 100644 --- a/net-im/ejabberd/ChangeLog +++ b/net-im/ejabberd/ChangeLog @@ -1,6 +1,16 @@ # ChangeLog for net-im/ejabberd # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/ChangeLog,v 1.33 2008/03/17 16:17:13 chainsaw Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/ChangeLog,v 1.34 2008/04/13 12:27:09 caleb Exp $ + +*ejabberd-2.0.0-r1 (13 Apr 2008) + + 13 Apr 2008; Caleb Tennis <caleb@gentoo.org> +files/ejabberd-2.0.0.confd, + files/ejabberd-2.0.0.initd, +files/ejabberd-wrapper-2.0.0.template, + +files/ejabberdctl-wrapper-2.0.0.template, + +files/2.0.0-ejab-542-mod_proxy65.patch, + +files/2.0.0-erlang12-s2s-in.patch, -ejabberd-2.0.0.ebuild, + +ejabberd-2.0.0-r1.ebuild: + Bump revision with a whole new ebuild, thanks to the folks in bug #207586 17 Mar 2008; Tony Vroon <chainsaw@gentoo.org> metadata.xml: Mark caleb as maintainer of this package. diff --git a/net-im/ejabberd/ejabberd-2.0.0-r1.ebuild b/net-im/ejabberd/ejabberd-2.0.0-r1.ebuild new file mode 100644 index 000000000000..87bed3616b21 --- /dev/null +++ b/net-im/ejabberd/ejabberd-2.0.0-r1.ebuild @@ -0,0 +1,151 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/ejabberd-2.0.0-r1.ebuild,v 1.1 2008/04/13 12:27:09 caleb Exp $ + +inherit eutils multilib + +JABBER_ETC="/etc/jabber" +JABBER_RUN="/var/run/jabber" +JABBER_SPOOL="/var/spool/jabber" +JABBER_LOG="/var/log/jabber" + +MY_PV=${PV} +MY_P=${PN}-${MY_PV} + +DESCRIPTION="The Erlang Jabber Daemon" +HOMEPAGE="http://ejabberd.jabber.ru/" +SRC_URI="http://process-one.net/en/projects/${PN}/download/${PV/_/-}/${P/_/-}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="debug mod_irc mod_muc mod_pubsub ldap odbc ssl web zlib" + +DEPEND=">=net-im/jabber-base-0.01 + >=dev-libs/expat-1.95 + >=dev-lang/erlang-11.2.5 + odbc? ( dev-db/unixODBC ) + ldap? ( =net-nds/openldap-2* ) + ssl? ( >=dev-libs/openssl-0.9.8e ) + zlib? ( sys-libs/zlib )" + +PROVIDE="virtual/jabber-server" +S=${WORKDIR}/${MY_P}/src + +src_unpack() { + unpack ${A} + cd "${S}" + + # Bug #171427 + epatch "${FILESDIR}/${MY_PV}-missing-declaration.patch" + # Bug #215853 + epatch "${FILESDIR}/${MY_PV}-erlang12-s2s-in.patch" + # patch for mod_proxy65 using erlang12 + # http://support.process-one.net/browse/EJAB-542 + epatch "${FILESDIR}/${MY_PV}-ejab-542-mod_proxy65.patch" + + # get rid of the prefix + sed -i -e "s/\\@prefix\\@//" "${S}/Makefile.in" \ + || die "cannot sed Makefile.in" + # we want ejabberdctl in /usr/sbin not /sbin !!! + sed -i -e "s/\\/sbin/\\/usr\\/sbin/" "${S}/Makefile.in" \ + || die "cannot sed Makefile.in" +} + +src_compile() { + econf --prefix=/ \ + $(use_enable mod_irc) \ + $(use_enable ldap eldap) \ + $(use_enable mod_muc) \ + $(use_enable mod_pubsub) \ + $(use_enable ssl tls) \ + $(use_enable web) \ + $(use_enable odbc) \ + $(use_enable zlib ejabberd_zlib) \ + || die "econf failed" + + if useq debug; then + emake ejabberd_debug=true || die "compiling ejabberd core failed" + else + emake || die "compiling ejabberd core failed" + fi +} + +src_install() { + make \ + DESTDIR="${D}" \ + EJABBERDDIR="${D}/usr/$(get_libdir)/erlang/lib/${P}" \ + ETCDIR="${D}${JABBER_ETC}" \ + LOGDIR="${D}${JABBER_LOG}" \ + install || die "install failed" + + # remove the default ejabberdctl as we use our own + rm "${D}/usr/sbin/ejabberdctl" + + insinto ${JABBER_ETC} + + chown -R jabber:jabber "${D}${JABBER_ETC}" + chown -R jabber:jabber "${D}${JABBER_LOG}" + chown -R jabber:jabber "${D}/usr/$(get_libdir)/erlang/lib/${P}" + + if useq ssl ; then + doins "${FILESDIR}/ssl.cnf" + newins "${FILESDIR}/self-cert-v2.sh" self-cert.sh + fi + + dohtml "${WORKDIR}/${MY_P}/doc/*.{html,png}" + + # set up /usr/sbin/ejabberd wrapper + cat "${FILESDIR}/ejabberd-wrapper-2.0.0.template" \ + | sed -e "s/\@libdir\@/$(get_libdir)/g" -e "s/\@version\@/${PV}/g" \ + > "${T}/ejabberd" + exeinto /usr/sbin + doexe "${T}/ejabberd" + + # set up /usr/sbin/ejabberdctl wrapper + cat "${FILESDIR}/ejabberdctl-wrapper-2.0.0.template" \ + | sed -e "s/\@libdir\@/$(get_libdir)/g" -e "s/\@version\@/${PV}/g" \ + > "${T}/ejabberdctl" + doexe "${T}/ejabberdctl" + + newinitd "${FILESDIR}/${MY_P}.initd" ${PN} + newconfd "${FILESDIR}/${MY_P}.confd" ${PN} + + # fix up the ssl cert paths in /etc/jabber/ejabberd.cfg to use the cert + # that would be generated by /etc/jabber/self-cert.sh + sed -i -e "s/\/path\/to\/ssl.pem/\/etc\/jabber\/ssl.pem/g" \ + "${D}${JABBER_ETC}/ejabberd.cfg" || die "Cannot sed ejabberd.cfg" + + # if mod_irc is not enabled, comment out the mod_irc in the default + # ejabberd.cfg + if ! use mod_irc; then + sed -i -e "s/{mod_irc,/%{mod_irc,/" \ + "${D}${JABBER_ETC}/ejabberd.cfg" || die "Cannot sed ejabberd.cfg" + fi +} + +pkg_postinst() { + elog "For configuration instructions, please see" + elog "/usr/share/doc/${PF}/html/guide.html, or the online version at" + elog "http://www.process-one.net/en/projects/ejabberd/docs/guide_en.html" + if useq ssl ; then + if [ ! -e /etc/jabber/ssl.pem ]; then + elog "Please edit ${JABBER_ETC}/ssl.cnf and run ${JABBER_ETC}/self-cert.sh" + elog "Ejabberd may refuse to start without an SSL certificate" + fi + fi + if ! useq web ; then + elog "The web USE flag is off, this has disabled the web admin interface." + fi + elog "====================================================================" + elog 'Quick Start Guide:' + elog '1) Add output of `hostname -s` to /etc/jabber/ejabberd.cfg line 89' + elog ' {hosts, ["localhost", "thehost"]}.' + elog '2) Add an admin user to /etc/jabber/ejabberd.cfg line 324' + elog ' {acl, admin, {user, "theadmin", "thehost"}}.' + elog '3) Start the server twice (needed to set cookie permissions);' + elog ' # /etc/init.d/ejabberd start; /etc/init.d/ejabberd start' + elog '4) Register the admin user' + elog ' # /usr/sbin/ejabberdctl register theadmin thehost thepassword' + elog '5) Log in with your favourite jabber client or using the web admin' +} + diff --git a/net-im/ejabberd/ejabberd-2.0.0.ebuild b/net-im/ejabberd/ejabberd-2.0.0.ebuild deleted file mode 100644 index c13843ba9456..000000000000 --- a/net-im/ejabberd/ejabberd-2.0.0.ebuild +++ /dev/null @@ -1,137 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/ejabberd-2.0.0.ebuild,v 1.1 2008/02/22 14:55:58 caleb Exp $ - -inherit eutils multilib - -JABBER_ETC="/etc/jabber" -JABBER_RUN="/var/run/jabber" -JABBER_SPOOL="/var/spool/jabber" -JABBER_LOG="/var/log/jabber" - -MY_PV=${PV} -MY_P=${PN}-${MY_PV} - -DESCRIPTION="The Erlang Jabber Daemon" -HOMEPAGE="http://ejabberd.jabber.ru/" -SRC_URI="http://process-one.net/en/projects/${PN}/download/${PV/_/-}/${P/_/-}.tar.gz" -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~ppc ~x86" -IUSE="debug mod_irc mod_muc mod_pubsub ldap odbc ssl web zlib" - -DEPEND=">=net-im/jabber-base-0.01 - >=dev-libs/expat-1.95 - >=dev-lang/erlang-11.2.5 - odbc? ( dev-db/unixODBC ) - ldap? ( =net-nds/openldap-2* ) - ssl? ( >=dev-libs/openssl-0.9.8e ) - zlib? ( sys-libs/zlib )" - -PROVIDE="virtual/jabber-server" -S=${WORKDIR}/${MY_P}/src - -src_unpack() { - unpack ${A} - cd "${S}" - - # Bug #171427 - epatch "${FILESDIR}/${MY_PV}-missing-declaration.patch" -} - -src_compile() { - econf \ - $(use_enable mod_irc) \ - $(use_enable ldap eldap) \ - $(use_enable mod_muc) \ - $(use_enable mod_pubsub) \ - $(use_enable ssl tls) \ - $(use_enable web) \ - $(use_enable odbc) \ - $(use_enable zlib ejabberd_zlib) \ - || die "econf failed" - - if useq debug; then - emake ejabberd_debug=true || die "compiling ejabberd core failed" - else - emake || die "compiling ejabberd core failed" - fi -} - -src_install() { - make \ - DESTDIR="${D}" \ - EJABBERDDIR="${D}/usr/$(get_libdir)/erlang/lib/${P}" \ - ETCDIR="${D}${JABBER_ETC}" \ - LOGDIR="${D}${JABBER_LOG}" \ - install \ - || die "install failed" - - chown -R jabber:jabber "${D}${JABBER_ETC}" - chown -R jabber:jabber "${D}${JABBER_LOG}" - chown -R jabber:jabber "${D}/usr/$(get_libdir)/erlang/lib/${P}" - - insinto /usr/share/doc/${PF} - dohtml doc/*.{html,png} - - # - # Create /usr/bin/ejabberd - # - cat <<EOF > "${T}/ejabberd" -#!/bin/bash - -erl -pa /usr/$(get_libdir)/erlang/lib/${P}/ebin \\ - ${pa} \\ - -sname ejabberd \\ - -s ejabberd \\ - -ejabberd config \"${JABBER_ETC}/ejabberd.cfg\" \\ - log_path \"${JABBER_LOG}/ejabberd.log\" \\ - -kernel inetrc \"${JABBER_ETC}/inetrc\" \\ - -sasl sasl_error_logger \{file,\"${JABBER_LOG}/sasl.log\"\} \\ - -mnesia dir \"${JABBER_SPOOL}\" \\ - \$@ -EOF - - # - # Create /usr/bin/ejabberdctl - # - cat <<EOF > "${T}/ejabberdctl" -#!/bin/sh - -exec env HOME=${JABBER_RUN} \\ - erl -pa /usr/$(get_libdir)/erlang/lib/${P}/ebin \\ - ${pa} \\ - -noinput \\ - -sname ejabberdctl \\ - -s ejabberd_ctl \\ - -extra \$@ -EOF - - dobin "${T}/ejabberdctl" - dobin "${T}/ejabberd" - - newinitd "${FILESDIR}/${MY_P}.initd" ${PN} - newconfd "${FILESDIR}/ejabberd-1.1.3.confd" ${PN} - - insinto ${JABBER_ETC} - doins "${FILESDIR}/inetrc" - if useq ssl ; then - doins "${FILESDIR}/ssl.cnf" - newins "${FILESDIR}/self-cert-v2.sh" self-cert.sh - fi -} - -pkg_postinst() { - elog "For configuration instructions, please see /usr/share/doc/${PF}/html/guide.html" - elog "or the online version at http://www.process-one.net/en/projects/ejabberd/docs/guide_en.html" - echo - if useq ssl ; then - if [ ! -e /etc/jabber/ssl.pem ]; then - elog "Please edit ${JABBER_ETC}/ssl.cnf and run ${JABBER_ETC}/self-cert.sh" - elog "Ejabberd may refuse to start without an SSL certificate" - fi - fi - if ! useq web ; then - elog "The web USE flag is off, this has disabled the web admin interface." - fi -} diff --git a/net-im/ejabberd/files/2.0.0-ejab-542-mod_proxy65.patch b/net-im/ejabberd/files/2.0.0-ejab-542-mod_proxy65.patch new file mode 100644 index 000000000000..6cc3bc815a56 --- /dev/null +++ b/net-im/ejabberd/files/2.0.0-ejab-542-mod_proxy65.patch @@ -0,0 +1,12 @@ +--- ejabberd-2.0.0/src/mod_proxy65/mod_proxy65_service.erl.original 2008-04-11 00:10:26.000000000 +0100 ++++ ejabberd-2.0.0/src/mod_proxy65/mod_proxy65_service.erl 2008-04-11 00:11:12.000000000 +0100 +@@ -201,7 +201,7 @@ + none -> get_proxy_or_domainip(ServerHost, MyHost); + Addr -> Addr + end, +- [_ | StrIP] = lists:append([[$. | integer_to_list(X)] || X <- inet:ip_to_bytes(IP)]), ++ StrIP = inet_parse:ntoa(IP), + StreamAddr = [{"jid", MyHost}, {"host", StrIP}, {"port", integer_to_list(Port)}], + {IP, #state{myhost = MyHost, + serverhost = ServerHost, + diff --git a/net-im/ejabberd/files/2.0.0-erlang12-s2s-in.patch b/net-im/ejabberd/files/2.0.0-erlang12-s2s-in.patch new file mode 100644 index 000000000000..68cc69810056 --- /dev/null +++ b/net-im/ejabberd/files/2.0.0-erlang12-s2s-in.patch @@ -0,0 +1,35 @@ +--- ejabberd-2.0.0/src/ejabberd_s2s_in.erl.original 2008-02-21 10:02:12.000000000 +0000 ++++ ejabberd-2.0.0/src/ejabberd_s2s_in.erl 2008-04-08 18:00:04.000000000 +0100 +@@ -50,9 +50,13 @@ + -include("jlib.hrl"). + -ifdef(SSL39). + -include_lib("ssl/include/ssl_pkix.hrl"). ++-define(PKIXEXPLICIT, 'OTP-PKIX'). ++-define(PKIXIMPLICIT, 'OTP-PKIX'). + -else. + -include_lib("ssl/include/PKIX1Explicit88.hrl"). + -include_lib("ssl/include/PKIX1Implicit88.hrl"). ++-define(PKIXEXPLICIT, 'PKIX1Explicit88'). ++-define(PKIXIMPLICIT, 'PKIX1Implicit88'). + -endif. + -include("XmppAddr.hrl"). + +@@ -603,7 +607,7 @@ + lists:flatmap( + fun(#'AttributeTypeAndValue'{type = ?'id-at-commonName', + value = Val}) -> +- case 'PKIX1Explicit88':decode('X520CommonName', Val) of ++ case ?PKIXEXPLICIT:decode('X520CommonName', Val) of + {ok, {_, D1}} -> + D = if + is_list(D1) -> D1; +@@ -637,7 +641,7 @@ + is_binary(Val) -> Val; + true -> Val + end, +- case 'PKIX1Implicit88':decode('SubjectAltName', BVal) of ++ case ?PKIXIMPLICIT:decode('SubjectAltName', BVal) of + {ok, SANs} -> + lists:flatmap( + fun({otherName, + diff --git a/net-im/ejabberd/files/ejabberd-2.0.0.confd b/net-im/ejabberd/files/ejabberd-2.0.0.confd new file mode 100644 index 000000000000..6399d27d2473 --- /dev/null +++ b/net-im/ejabberd/files/ejabberd-2.0.0.confd @@ -0,0 +1,23 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/files/ejabberd-2.0.0.confd,v 1.1 2008/04/13 12:27:10 caleb Exp $ + +# Name of your ejabberd node. Used by ejabberdctl to determine which +# node to communicate with. +EJABBERD_NODE="ejabberd@`hostname -s`" + +# Max number of open network connections. Default is 1024. Increasing +# this will slightly increase memory usage. +#ERL_MAX_PORTS=1024 + +# Return memory to the system after using it, instead of keeping it +# allocated for future use. Decreases the memory required by ejabberd, +# but makes it run slower. Default is unset, set to any value to +# activate. +#ERL_FULLSWEEP_AFTER=0 + +# set to 1, "true" or "yes" if you have a symmetric-multi-processor +# default is non smp +#HAVE_SMP=0 + + diff --git a/net-im/ejabberd/files/ejabberd-2.0.0.initd b/net-im/ejabberd/files/ejabberd-2.0.0.initd index c16b849602dd..1b351c464241 100644 --- a/net-im/ejabberd/files/ejabberd-2.0.0.initd +++ b/net-im/ejabberd/files/ejabberd-2.0.0.initd @@ -1,7 +1,7 @@ #!/sbin/runscript -# Copyright 1999-2007 Gentoo Foundation +# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/files/ejabberd-2.0.0.initd,v 1.1 2008/02/05 13:27:45 caleb Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/files/ejabberd-2.0.0.initd,v 1.2 2008/04/13 12:27:10 caleb Exp $ opts="${opts} reload" @@ -13,7 +13,7 @@ depend() { checkconfig() { if [ ! -e /etc/jabber/ejabberd.cfg ] ; then - eerror "You need an /etc/jabber/ejabberd.cfg file to run ejabberd" + eerror "You need a /etc/jabber/ejabberd.cfg file to run ejabberd" return 1 fi } @@ -21,8 +21,21 @@ checkconfig() { start() { checkconfig || return 1 ebegin "Starting eJabberd" + # the process name of beam is different depending whether smp is used. + # set it explicitly so start-stop-daemon works + case "$HAVE_SMP" in + "1"|"true"|"yes") + BEAMNAME="beam.smp" + SMPOPT="enable" + ;; + *) + BEAMNAME="beam" + SMPOPT="disable" + ;; + esac start-stop-daemon --start --quiet --chuid jabber:jabber \ - --exec /usr/bin/env HOME=/var/run/jabber /usr/bin/ejabberd -- -noshell -detached + --name $BEAMNAME \ + --exec /usr/sbin/ejabberd -- -detached -noinput -smp $SMPOPT eend $? # For bug #190266 chown jabber:jabber /var/run/jabber/.erlang.cookie @@ -30,33 +43,13 @@ start() { stop() { ebegin "Stopping eJabberd" - if [ -z "$EJABBERD_NODE" ]; - then - EJABBERD_NODE="ejabberd@`hostname -s`" - fi - /usr/bin/ejabberdctl $EJABBERD_NODE stop - eend $? -} - -# Work around a bug in /sbin/runscript.sh - it won't run our custom -# restart() unless it finds these two strings in the file. -# svc_start svc_stop -restart() { - ebegin "Restarting eJabberd" - if [ -z "$EJABBERD_NODE" ]; - then - EJABBERD_NODE="ejabberd@`hostname -s`" - fi - /usr/bin/ejabberdctl $EJABBERD_NODE restart + /usr/sbin/ejabberdctl stop eend $? } reload() { ebegin "Reloading eJabberd" - if [ -z "$EJABBERD_NODE" ]; - then - EJABBERD_NODE="ejabberd@`hostname -s`" - fi - /usr/bin/ejabberdctl $EJABBERD_NODE reopen-log + /usr/sbin/ejabberdctl reopen-log eend $? } + diff --git a/net-im/ejabberd/files/ejabberd-wrapper-2.0.0.template b/net-im/ejabberd/files/ejabberd-wrapper-2.0.0.template new file mode 100644 index 000000000000..89f3ff4824e3 --- /dev/null +++ b/net-im/ejabberd/files/ejabberd-wrapper-2.0.0.template @@ -0,0 +1,49 @@ +#!/bin/sh + +[ -f /etc/conf.d/ejabberd ] && . /etc/conf.d/ejabberd + +# provide some default configuration +ERL=/usr/bin/erl +CONFIG=/etc/jabber/ejabberd.cfg +INETRC=/etc/jabber/inetrc +LOG_PATH=/var/log/jabber/ejabberd.log +SASL_LOG=/var/log/jabber/sasl.log +SPOOL=/var/spool/jabber + +ARGS= +while [ $# -ne 0 ] ; do + PARAM=$1 + shift + case $PARAM in + --) break ;; + --node) EJABBERD_NODE=$1; shift ;; + --config) CONFIG=$1 ; shift ;; + --log) LOG_PATH=$1 ; shift ;; + --sasl-log) SASL_LOG=$1 ; shift ;; + --spool) SPOOL=$1 ; shift ;; + *) ARGS="$ARGS $PARAM" ;; + esac +done + +if [ "$EJABBERD_NODE" = "${EJABBERD_NODE%.*}" ] ; then + SNAME=-sname +else + SNAME=-name +fi + +# export ejabberd configuration environment variables +export HOME=/var/run/jabber +export EJABBERD_EBIN=/usr/@libdir@/erlang/lib/ejabberd-@version@/ebin +export EJABBERD_MSGS_PATH=/usr/@libdir@/erlang/lib/ejabberd-@version@/priv/msgs +export EJABBERD_SO_PATH=/usr/@libdir@/erlang/lib/ejabberd-@version@/priv/lib +export EJABBERD_LOG_PATH=$LOG_PATH +export EJABBERD_CONFIG_PATH=$CONFIG + +exec $ERL $SNAME $EJABBERD_NODE \ + -s ejabberd \ + -kernel inetrc \"$INETRC\" \ + -sasl sasl_error_logger \{file,\"$SASL_LOG\"\} \ + -mnesia dir \"$SPOOL\" \ + $ERL_OPTIONS $ARGS "$@" + + diff --git a/net-im/ejabberd/files/ejabberdctl-wrapper-2.0.0.template b/net-im/ejabberd/files/ejabberdctl-wrapper-2.0.0.template new file mode 100644 index 000000000000..6443678cf9b2 --- /dev/null +++ b/net-im/ejabberd/files/ejabberdctl-wrapper-2.0.0.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 "$@" + + |