summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrzysztof Pawlik <nelchael@gentoo.org>2007-01-09 10:38:59 +0000
committerKrzysztof Pawlik <nelchael@gentoo.org>2007-01-09 10:38:59 +0000
commitb02d03755baf906ff050f45e3326dbb71d60bfc6 (patch)
tree811150885c6f816aa4877bd3eb1f6c1c770bc07e /net-im/jabberd
parentstable x86, bug #160669 (diff)
downloadgentoo-2-b02d03755baf906ff050f45e3326dbb71d60bfc6.tar.gz
gentoo-2-b02d03755baf906ff050f45e3326dbb71d60bfc6.tar.bz2
gentoo-2-b02d03755baf906ff050f45e3326dbb71d60bfc6.zip
Fix jabberd init.d script to start multiple services, see bug #158466.
(Portage version: 2.1.2_rc4-r7)
Diffstat (limited to 'net-im/jabberd')
-rw-r--r--net-im/jabberd/ChangeLog8
-rw-r--r--net-im/jabberd/files/jabberd-2.0.11.init13
2 files changed, 16 insertions, 5 deletions
diff --git a/net-im/jabberd/ChangeLog b/net-im/jabberd/ChangeLog
index c993adec4863..ba5e681f5ec8 100644
--- a/net-im/jabberd/ChangeLog
+++ b/net-im/jabberd/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for net-im/jabberd
-# Copyright 2000-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-im/jabberd/ChangeLog,v 1.91 2006/11/23 20:34:02 vivo Exp $
+# Copyright 2000-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-im/jabberd/ChangeLog,v 1.92 2007/01/09 10:38:59 nelchael Exp $
+
+ 09 Jan 2007; Krzysiek Pawlik <nelchael@gentoo.org>
+ files/jabberd-2.0.11.init:
+ Fix jabberd init.d script to start multiple services, see bug #158466.
23 Nov 2006; Francesco Riosa <vivo@gentoo.org> jabberd-1.4.4-r3.ebuild,
jabberd-2.0.11-r1.ebuild:
diff --git a/net-im/jabberd/files/jabberd-2.0.11.init b/net-im/jabberd/files/jabberd-2.0.11.init
index 59fe2ccb8ecb..fee8d2ea2c20 100644
--- a/net-im/jabberd/files/jabberd-2.0.11.init
+++ b/net-im/jabberd/files/jabberd-2.0.11.init
@@ -1,7 +1,7 @@
#!/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/jabberd-2.0.11.init,v 1.2 2006/10/11 14:29:48 nelchael Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-im/jabberd/files/jabberd-2.0.11.init,v 1.3 2007/01/09 10:38:59 nelchael Exp $
depend() {
need net
@@ -29,11 +29,13 @@ function stopJabberServices() {
start() {
einfo "Starting Jabber Server ..."
- local services=$(grep -v ^# /etc/jabber/jabberd.cfg | grep '..*' | awk '{print $1}')
+ local services=$(grep -v ^# /etc/jabber/jabberd.cfg | grep '..*' | awk '{print $1 ":" $2}')
+ local tempPidHack=/var/run/jabber/start_stop_daemon.pid
eindent
for service in ${services}; do
- cfgfile="$(grep "^${service}" /etc/jabber/jabberd.cfg | awk '{print $2}')"
+ cfgfile=${service/*:/}
+ service=${service/:*/}
if [[ ! -f "${cfgfile}" ]]; then
if [[ -f "/etc/jabber/${service}.xml" ]]; then
cfgfile="/etc/jabber/${service}.xml"
@@ -52,17 +54,22 @@ start() {
return 1
fi
+ rm -f ${tempPidHack} &> /dev/null
ebegin "Starting ${service} (${cfgfile})"
start-stop-daemon \
--background \
--start \
--chuid jabber:jabber \
--exec /usr/bin/${service} \
+ --pid ${tempPidHack} \
+ --make-pidfile \
-- -c ${cfgfile}
eend $?
+ rm -f ${tempPidHack} &> /dev/null
done
eoutdent
+
}
stop() {