summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Ospald <hasufell@gentoo.org>2013-12-15 13:10:13 +0000
committerJulian Ospald <hasufell@gentoo.org>2013-12-15 13:10:13 +0000
commit7c862cf5ff6cad864d058d8c3c36438873021492 (patch)
tree1cd27bfea118112e31b6416698a00b03573e2a08 /net-im/jabberd2
parentamd64/ia64/ppc/sparc/x86 stable wrt bug #492152; Drop old revision (diff)
downloadgentoo-2-7c862cf5ff6cad864d058d8c3c36438873021492.tar.gz
gentoo-2-7c862cf5ff6cad864d058d8c3c36438873021492.tar.bz2
gentoo-2-7c862cf5ff6cad864d058d8c3c36438873021492.zip
nicer pidfile detection
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key E73C35B3)
Diffstat (limited to 'net-im/jabberd2')
-rw-r--r--net-im/jabberd2/ChangeLog5
-rw-r--r--net-im/jabberd2/files/jabberd2-2.3.1.init7
2 files changed, 8 insertions, 4 deletions
diff --git a/net-im/jabberd2/ChangeLog b/net-im/jabberd2/ChangeLog
index 498e813e6dc4..86b694491dfc 100644
--- a/net-im/jabberd2/ChangeLog
+++ b/net-im/jabberd2/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for net-im/jabberd2
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-im/jabberd2/ChangeLog,v 1.51 2013/12/15 12:48:59 hasufell Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-im/jabberd2/ChangeLog,v 1.52 2013/12/15 13:10:13 hasufell Exp $
+
+ 15 Dec 2013; Julian Ospald <hasufell@gentoo.org> files/jabberd2-2.3.1.init:
+ nicer pidfile detection
*jabberd2-2.3.1-r1 (15 Dec 2013)
diff --git a/net-im/jabberd2/files/jabberd2-2.3.1.init b/net-im/jabberd2/files/jabberd2-2.3.1.init
index d56c7f76e133..633c0529c047 100644
--- a/net-im/jabberd2/files/jabberd2-2.3.1.init
+++ b/net-im/jabberd2/files/jabberd2-2.3.1.init
@@ -1,7 +1,7 @@
#!/sbin/runscript
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-im/jabberd2/files/jabberd2-2.3.1.init,v 1.1 2013/12/15 12:48:59 hasufell Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-im/jabberd2/files/jabberd2-2.3.1.init,v 1.2 2013/12/15 13:10:13 hasufell Exp $
depend() {
need net
@@ -33,7 +33,7 @@ start_pre() {
start() {
einfo "Starting Jabber Server ..."
- local services
+ local services executable cfgfile pidfile
services=$(grep -v ^# /etc/jabber/jabberd.cfg | grep '..*' | awk '{print $1 ":" $2}')
eindent
for service in ${services}; do
@@ -59,12 +59,13 @@ start() {
fi
ebegin "Starting ${service} (${cfgfile})"
+ pidfile="$(grep -v ^# ${cfgfile} | grep '<pidfile>' | sed 's#<.\?pidfile>##g')"
start-stop-daemon \
--background \
--start \
--user jabber:jabber \
--exec /usr/bin/${service} \
- --pid /var/run/jabber/jabberd2-$(basename ${cfgfile%.xml}).pid \
+ --pid ${pidfile} \
-- -c ${cfgfile}
eend $?