diff options
author | Eivind Uggedal <eivind@uggedal.com> | 2014-05-31 07:44:42 +0000 |
---|---|---|
committer | Eivind Uggedal <eivind@uggedal.com> | 2014-05-31 07:44:42 +0000 |
commit | 93f7e4b36d7d83b94c8a005f784c0aeb2ec6f2fb (patch) | |
tree | 60d453dc9d5dd31743bb20bd67c6ca6236eb2a3d /unmaintained/ejabberd/ejabberd.initd | |
parent | ae5e9433489df67540628bd581c7a2727af7100a (diff) | |
download | aports-93f7e4b36d7d83b94c8a005f784c0aeb2ec6f2fb.tar.bz2 aports-93f7e4b36d7d83b94c8a005f784c0aeb2ec6f2fb.tar.xz |
testing/ejabberd: move to unmaintained
Diffstat (limited to 'unmaintained/ejabberd/ejabberd.initd')
-rw-r--r-- | unmaintained/ejabberd/ejabberd.initd | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/unmaintained/ejabberd/ejabberd.initd b/unmaintained/ejabberd/ejabberd.initd new file mode 100644 index 0000000000..2d6d44d3c3 --- /dev/null +++ b/unmaintained/ejabberd/ejabberd.initd @@ -0,0 +1,47 @@ +#!/sbin/runscript +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/files/ejabberd-3.initd,v 1.3 2010/06/02 07:12:27 pva Exp $ + +depend() { + use dns + need net + provide jabber-server +} + +start() { + if ejabberdctl status >/dev/null 2>&1; then + ewarn "ejabberd is already started (manually?)." + return 0 + fi + ebegin "Starting ejabberd" + /usr/sbin/ejabberdctl ${EJABBERDCTL_OPT} start + eend $? +} + +stop() { + ejabberdctl status >/dev/null 2>&1 + if test $? = 3; then + ewarn "ejabberd is already stopped (manually?)." + return 0 + fi + ebegin "Stopping ejabberd" + if /usr/sbin/ejabberdctl stop >/dev/null 2>&1; then + cnt=0 + sleep 1 + while ejabberdctl status >/dev/null 2>&1 || test $? = 1; do + echo -n . + cnt=`expr $cnt + 1` + if [ $cnt -ge 60 ] ; then + eend 1 + break + fi + sleep 1 + done + eend 0 + else + eend 1 + einfo "Please, run '/usr/sbin/ejabberdctl stop' to see what's going on." + fi + eend 0 +} |