summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 $?