diff options
author | Julian Ospald <hasufell@gentoo.org> | 2013-12-15 13:10:13 +0000 |
---|---|---|
committer | Julian Ospald <hasufell@gentoo.org> | 2013-12-15 13:10:13 +0000 |
commit | 7c862cf5ff6cad864d058d8c3c36438873021492 (patch) | |
tree | 1cd27bfea118112e31b6416698a00b03573e2a08 /net-im/jabberd2/files | |
parent | amd64/ia64/ppc/sparc/x86 stable wrt bug #492152; Drop old revision (diff) | |
download | gentoo-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/files')
-rw-r--r-- | net-im/jabberd2/files/jabberd2-2.3.1.init | 7 |
1 files changed, 4 insertions, 3 deletions
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 $? |