Modified init.d script.
authorKrzysztof Pawlik <nelchael@gentoo.org>
Wed, 11 Oct 2006 14:29:48 +0000 (14:29 +0000)
committerKrzysztof Pawlik <nelchael@gentoo.org>
Wed, 11 Oct 2006 14:29:48 +0000 (14:29 +0000)
Package-Manager: portage-2.1.2_pre2-r8

net-im/jabberd/ChangeLog
net-im/jabberd/Manifest
net-im/jabberd/files/jabberd-2.0.11.init
net-im/jabberd/jabberd-2.0.11-r1.ebuild

index ffbc1a3aa35d9b1223775c1e920017080d39942c..2828bd23046dae261cad9cde89b001168d5ed876 100644 (file)
@@ -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:
index 7ef01313a7d7c9e5fc4b74488d5802bdcc16f59a..d38c5a3cb9f934b24f74591f1131af66157b6535 100644 (file)
@@ -69,10 +69,10 @@ AUX jabberd-2.0.11-configure.in.patch 396 RMD160 86c99a761a23e55ebce98bdffba060e
 MD5 0d6acfc3d4a22d09d4d17ffd202d38d8 files/jabberd-2.0.11-configure.in.patch 396
 RMD160 86c99a761a23e55ebce98bdffba060e18073826f files/jabberd-2.0.11-configure.in.patch 396
 SHA256 afa527ce6e4abedf097a92dc73046b8bacd851bf75ea309bd706937c8080aa5f files/jabberd-2.0.11-configure.in.patch 396
-AUX jabberd-2.0.11.init 624 RMD160 5e41e3be21ae8d5fe95f569c524c19b1c89ba42d SHA1 bcb763873a5db7858bb8dc9ce1331c83120dce10 SHA256 eeda58bb94c29311ff1b738dbbca3fa69dba277cfb84e0c7ff183d258e37bc61
-MD5 cabea842faf5e5b0282b796366de66de files/jabberd-2.0.11.init 624
-RMD160 5e41e3be21ae8d5fe95f569c524c19b1c89ba42d files/jabberd-2.0.11.init 624
-SHA256 eeda58bb94c29311ff1b738dbbca3fa69dba277cfb84e0c7ff183d258e37bc61 files/jabberd-2.0.11.init 624
+AUX jabberd-2.0.11.init 1545 RMD160 2e80cded1163c762d67e0384a238be98d578d2f0 SHA1 504985e68b195a305353c6d38d8cf08b4ff27f6b SHA256 0dbf1a9a3729f3649d94b74f2a454a7ed85a0d581be1298f66b4eba6b12cb31f
+MD5 b195e0529406d7d2f40643fea20c24f0 files/jabberd-2.0.11.init 1545
+RMD160 2e80cded1163c762d67e0384a238be98d578d2f0 files/jabberd-2.0.11.init 1545
+SHA256 0dbf1a9a3729f3649d94b74f2a454a7ed85a0d581be1298f66b4eba6b12cb31f files/jabberd-2.0.11.init 1545
 AUX multiple-xml-patch-00 5934 RMD160 89554e2f3f3354ecc248324bcb2a8b9151ebc67d SHA1 27f0aab6b2ec468dd9a1d3b7633555db83ade23f SHA256 43287b8265631498e0e82dfd0b362ec2513ffc4f3ea4daf112a52f3be49795c7
 MD5 5aeafd17644a405b363de0ea1eb22d8b files/multiple-xml-patch-00 5934
 RMD160 89554e2f3f3354ecc248324bcb2a8b9151ebc67d files/multiple-xml-patch-00 5934
@@ -118,18 +118,18 @@ EBUILD jabberd-1.4.4-r3.ebuild 3199 RMD160 9d6fb7f263d2ec56e5134faf593deb7ab656b
 MD5 edeb18c1c4022f1684f0c2f123affd80 jabberd-1.4.4-r3.ebuild 3199
 RMD160 9d6fb7f263d2ec56e5134faf593deb7ab656b817 jabberd-1.4.4-r3.ebuild 3199
 SHA256 3fe6136518958e23e1ff8fd6384ed9f0e112fb1ed4aadb5ad6da2923da9c279e jabberd-1.4.4-r3.ebuild 3199
-EBUILD jabberd-2.0.11-r1.ebuild 2032 RMD160 4556faf33154431de07d6d64b9e0d81a901ba9c4 SHA1 c89677333491fb7aaf310e180893aa44094eb9e2 SHA256 eaffb294454cda3f755f4a6fa2d893fa9b2983d0c83cb305e723b8e3cdf6e26f
-MD5 77c082762a80f7888a3278f847c27c76 jabberd-2.0.11-r1.ebuild 2032
-RMD160 4556faf33154431de07d6d64b9e0d81a901ba9c4 jabberd-2.0.11-r1.ebuild 2032
-SHA256 eaffb294454cda3f755f4a6fa2d893fa9b2983d0c83cb305e723b8e3cdf6e26f jabberd-2.0.11-r1.ebuild 2032
+EBUILD jabberd-2.0.11-r1.ebuild 2108 RMD160 12b005b2a69967564312c6c3a22ab9a0238aad16 SHA1 cdc4a8081b426ff1e577c1e93b882848c11185bd SHA256 4e965e9bcd9f53bd3e3005d9b1f1cd6961a145dae42278741e8f91e499d864d9
+MD5 189b6fe8170536a8663ac8c74140cbbd jabberd-2.0.11-r1.ebuild 2108
+RMD160 12b005b2a69967564312c6c3a22ab9a0238aad16 jabberd-2.0.11-r1.ebuild 2108
+SHA256 4e965e9bcd9f53bd3e3005d9b1f1cd6961a145dae42278741e8f91e499d864d9 jabberd-2.0.11-r1.ebuild 2108
 EBUILD jabberd-2.0.11.ebuild 3492 RMD160 a13a765b26d7322d43e3c54c50650daf59b84794 SHA1 0e73671d2dfa4bae99c2f391ac65a5f06a918d81 SHA256 949c6f68c557bfa68c67e9da9861d5ee434f392b7fd98aed61fb107af6aa9986
 MD5 c96b7efa391c9d83c36732bab36ac7fd jabberd-2.0.11.ebuild 3492
 RMD160 a13a765b26d7322d43e3c54c50650daf59b84794 jabberd-2.0.11.ebuild 3492
 SHA256 949c6f68c557bfa68c67e9da9861d5ee434f392b7fd98aed61fb107af6aa9986 jabberd-2.0.11.ebuild 3492
-MISC ChangeLog 13247 RMD160 4deed800530aa0b88271e55f9a67551ec6cf587d SHA1 f4d66083c20a851269e68f29298b959356fdd367 SHA256 0302a375c8699015b7a8cd7b4388d3869386bfce005737902b6376b3d1956b3c
-MD5 2d3bc6b6fc8de1ad553a59b7d23aa62e ChangeLog 13247
-RMD160 4deed800530aa0b88271e55f9a67551ec6cf587d ChangeLog 13247
-SHA256 0302a375c8699015b7a8cd7b4388d3869386bfce005737902b6376b3d1956b3c ChangeLog 13247
+MISC ChangeLog 13382 RMD160 66e840a930fbd0840ae08cbf48afcdd04cb3af62 SHA1 e8fa0e273ae5bf41c7b91a6603cccdd6f74b1e61 SHA256 a66a7ac3e1b1522db63347ad01f91219d3ea6e30ab98550f125058a25bd5cfad
+MD5 e85aec1c383f46a674692a38f61647e9 ChangeLog 13382
+RMD160 66e840a930fbd0840ae08cbf48afcdd04cb3af62 ChangeLog 13382
+SHA256 a66a7ac3e1b1522db63347ad01f91219d3ea6e30ab98550f125058a25bd5cfad ChangeLog 13382
 MISC metadata.xml 399 RMD160 e223c713f74619996bc47a70298aa535f6addf09 SHA1 dc9bc290a5ed00f7101aabd3a40b346112eb40eb SHA256 f68b0864864ad54de5cf072835fc9903e709987261ad1fc102afb0019aa52377
 MD5 be8887bde84aab1d4ff9d5a0f5d50141 metadata.xml 399
 RMD160 e223c713f74619996bc47a70298aa535f6addf09 metadata.xml 399
@@ -149,7 +149,7 @@ SHA256 8d5a3e81789ef9e85b365e2974311b0f46ffb940a2b0bfdbc80457e40014f05b files/di
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.5 (GNU/Linux)
 
-iD8DBQFFJN2Ngo/w9rxVVVERAi+iAKCBauSzjlq4uTCAbixkDoUKavmPmgCfVtK1
-MROQ7qo6ja0q+c0Xbvz11+8=
-=DsS5
+iD8DBQFFLP//go/w9rxVVVERAsL/AJ9WRtaoYPlTe7WxAjS+yiC7oKuqbACdEAC9
+RJqV9bAM/meTUACXKnPa8fE=
+=FJuc
 -----END PGP SIGNATURE-----
index f0b75a3eb1b05390b2a857410aeec4548a76cf28..59fe2ccb8ecb23fc70d0e8f8daf6cbf73eff3abb 100644 (file)
@@ -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
+
 }
index c69b768d3a40e78975b6cb19d1afbd60a122aa93..3906ef6895943d22d1bbf0060687673d7c3cd31a 100644 (file)
@@ -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