diff options
author | Krzysztof Pawlik <nelchael@gentoo.org> | 2006-10-11 14:29:48 +0000 |
---|---|---|
committer | Krzysztof Pawlik <nelchael@gentoo.org> | 2006-10-11 14:29:48 +0000 |
commit | 41533137a6e14eda9bf3db1c225c6c7b3f2d2232 (patch) | |
tree | 3882630697b8840d1d0f3f77c2c99645c1537f6b /net-im | |
parent | bump (diff) | |
download | gentoo-2-41533137a6e14eda9bf3db1c225c6c7b3f2d2232.tar.gz gentoo-2-41533137a6e14eda9bf3db1c225c6c7b3f2d2232.tar.bz2 gentoo-2-41533137a6e14eda9bf3db1c225c6c7b3f2d2232.zip |
Modified init.d script.
(Portage version: 2.1.2_pre2-r8)
Diffstat (limited to 'net-im')
-rw-r--r-- | net-im/jabberd/ChangeLog | 6 | ||||
-rw-r--r-- | net-im/jabberd/files/jabberd-2.0.11.init | 67 | ||||
-rw-r--r-- | net-im/jabberd/jabberd-2.0.11-r1.ebuild | 5 |
3 files changed, 67 insertions, 11 deletions
diff --git a/net-im/jabberd/ChangeLog b/net-im/jabberd/ChangeLog index ffbc1a3aa35d..2828bd23046d 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.81 2006/10/05 10:24:53 nelchael Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-im/jabberd/ChangeLog,v 1.82 2006/10/11 14:29:48 nelchael Exp $ + + 11 Oct 2006; Krzysiek Pawlik <nelchael@gentoo.org> + files/jabberd-2.0.11.init, jabberd-2.0.11-r1.ebuild: + Modified init.d script. 05 Oct 2006; Krzysiek Pawlik <nelchael@gentoo.org> 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 f0b75a3eb1b0..59fe2ccb8ecb 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.1 2006/10/04 20:48:58 nelchael Exp $ +# $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 $ depend() { need net @@ -9,16 +9,65 @@ depend() { provide jabber-server } +function stopJabberServices() { + + eindent + for pidfile in /var/run/jabber/*.pid; do + if [[ -f "${pidfile}" ]]; then + service=$(basename ${pidfile/.pid/}) + ebegin "Stopping ${service}" + start-stop-daemon \ + --stop \ + --pidfile ${pidfile} + eend $? + fi + done + eoutdent + +} + start() { - ebegin "Starting Jabber Server" - start-stop-daemon --start -c jabber:jabber \ - -b --make-pidfile --pidfile /var/run/jabber/jabberd.pid \ - -q -x /usr/bin/jabberd - eend $? + + einfo "Starting Jabber Server ..." + local services=$(grep -v ^# /etc/jabber/jabberd.cfg | grep '..*' | awk '{print $1}') + eindent + for service in ${services}; do + + cfgfile="$(grep "^${service}" /etc/jabber/jabberd.cfg | awk '{print $2}')" + if [[ ! -f "${cfgfile}" ]]; then + if [[ -f "/etc/jabber/${service}.xml" ]]; then + cfgfile="/etc/jabber/${service}.xml" + else + eerror "Can't find: ${cfgfile} or default /etc/jabber/${service}.xml" + stopJabberServices + return 1 + fi + fi + + executable=/usr/bin/${service} + + if [[ ! -f "${executable}" ]]; then + eerror "Can't find executable: ${executable}" + stopJabberServices + return 1 + fi + + ebegin "Starting ${service} (${cfgfile})" + start-stop-daemon \ + --background \ + --start \ + --chuid jabber:jabber \ + --exec /usr/bin/${service} \ + -- -c ${cfgfile} + eend $? + + done + eoutdent } stop() { - ebegin "Stopping Jabber Server" - start-stop-daemon --stop -q --pidfile /var/run/jabber/jabberd.pid - eend $? + + einfo "Stopping Jabber Server" + stopJabberServices + } diff --git a/net-im/jabberd/jabberd-2.0.11-r1.ebuild b/net-im/jabberd/jabberd-2.0.11-r1.ebuild index c69b768d3a40..3906ef689594 100644 --- a/net-im/jabberd/jabberd-2.0.11-r1.ebuild +++ b/net-im/jabberd/jabberd-2.0.11-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-im/jabberd/jabberd-2.0.11-r1.ebuild,v 1.3 2006/10/05 10:24:53 nelchael Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-im/jabberd/jabberd-2.0.11-r1.ebuild,v 1.4 2006/10/11 14:29:48 nelchael Exp $ inherit autotools eutils versionator @@ -75,6 +75,9 @@ src_install() { -e 's,/var/jabberd/log/,/var/log/jabber/,g' \ -e 's,/var/jabberd/db,/var/spool/jabber/,g' \ *.xml *.xml.dist || die "sed failed" + sed -i \ + -e 's,<module>mysql</module>,<module>db</module>,' \ + c2s.xml* dodoc AUTHORS PROTOCOL README docinto tools |