summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-im/jabberd/files/jabber.init.gentoo')
-rwxr-xr-xnet-im/jabberd/files/jabber.init.gentoo91
1 files changed, 0 insertions, 91 deletions
diff --git a/net-im/jabberd/files/jabber.init.gentoo b/net-im/jabberd/files/jabber.init.gentoo
deleted file mode 100755
index 35117b4bd4b0..000000000000
--- a/net-im/jabberd/files/jabber.init.gentoo
+++ /dev/null
@@ -1,91 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2005 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-im/jabberd/files/jabber.init.gentoo,v 1.1 2005/01/31 23:05:41 humpback Exp $
-
-depend() {
- need net
- use mysql postgresql slapd
- provide jabber-server
-}
-
-components="router resolver sm c2s s2s"
-
-my_start() {
- ebegin "-> Starting ${i}"
- component=${i}
-# pidfile=/var/jabberd/pid/${component}.pid
-# ## remove components pidfile
-# rm -f "${pidfile}" >/dev/null 2>&1
- ## start component
- start-stop-daemon --start -c jabber:jabber -b \
- -q -x /usr/bin/${component} >/dev/null 2>&1
-# ## check if pidfile exists
-# if [ ! -f "${pidfile}" ]; then
-# false
-# ## check if pidfile contains the pid of a running process
-# elif ! ps -p "$(< ${pidfile})" -o pid= >/dev/null 2>&1; then
-# false
-# fi
- eend $?
-}
-
-my_stop() {
- ebegin "-> Stopping ${i}"
- component=${i}
- pidfile=/var/jabberd/pid/${component}.pid
- start-stop-daemon --stop -q --pidfile ${pidfile} >/dev/null 2>&1
-# if [ -f "${pidfile}" ] && ps -p "$(< ${pidfile})" -o pid= >/dev/null 2>&1; then
-# false
-# fi
-# ## remove components pidfile
-# rm -f "${pidfile}" >/dev/null 2>&1
- eend $?
-}
-
-start() {
- ebegin "Starting Jabber Server"
- local started=''
- local failed=''
- for i in ${components}; do
- if ! my_start ${i}; then
- failed="${failed:+${failed} }${i}"
- else
- started="${started:+${started} }${i}"
- fi
- done
- if [ -n "${failed}" ]; then
- eerror
- eerror "The following components failed to start:"
- eerror "-> ${failed}"
- eerror
- eerror "Trying to stop started components"
- for i in ${started}; do
- my_stop ${i}
- done
- false
- fi
- eend $?
-}
-
-stop() {
- ebegin "Stopping Jabber Server"
- local failed=''
- for i in ${components}; do
- if ! my_stop ${i}; then
- failed="${failed:+${failed} }${i}"
- fi
- done
- if [ -n "${failed}" ]; then
- eerror
- eerror "The following components failed to stop:"
- eerror "-> ${failed}"
- eerror
- eerror "Please kill the processes manually and reset"
- eerror "this service to a stopped state using"
- eerror "-> ${0} zap"
- eerror
- false
- fi
- eend $?
-}