summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Bronder <jsbronder@gentoo.org>2013-03-08 02:48:57 +0000
committerJustin Bronder <jsbronder@gentoo.org>2013-03-08 02:48:57 +0000
commitd40afb4957f7293aefa6a1552f69ddaf2e1dbb1f (patch)
treefa06ae725fd7cbdb0f57fe98a01a542a7515f462 /net-nntp
parentForce eautoreconf run. (diff)
downloadhistorical-d40afb4957f7293aefa6a1552f69ddaf2e1dbb1f.tar.gz
historical-d40afb4957f7293aefa6a1552f69ddaf2e1dbb1f.tar.bz2
historical-d40afb4957f7293aefa6a1552f69ddaf2e1dbb1f.zip
Fix init.d stop(), re #459992
Package-Manager: portage-2.1.11.50/cvs/Linux x86_64 Manifest-Sign-Key: 0x4D7043C9
Diffstat (limited to 'net-nntp')
-rw-r--r--net-nntp/sabnzbd/ChangeLog5
-rw-r--r--net-nntp/sabnzbd/Manifest10
-rw-r--r--net-nntp/sabnzbd/files/sabnzbd.initd31
3 files changed, 35 insertions, 11 deletions
diff --git a/net-nntp/sabnzbd/ChangeLog b/net-nntp/sabnzbd/ChangeLog
index 6f3f1d0af96a..34e3aacb562e 100644
--- a/net-nntp/sabnzbd/ChangeLog
+++ b/net-nntp/sabnzbd/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for net-nntp/sabnzbd
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-nntp/sabnzbd/ChangeLog,v 1.9 2013/02/22 01:32:26 jsbronder Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-nntp/sabnzbd/ChangeLog,v 1.10 2013/03/08 02:46:45 jsbronder Exp $
+
+ 08 Mar 2013; Justin Bronder <jsbronder@gentoo.org> files/sabnzbd.initd:
+ Fix init.d stop(), re #459992
22 Feb 2013; Justin Bronder <jsbronder@gentoo.org> files/sabnzbd.initd:
Correctly track status via pidfile re #458034. Thanks to Gerard Neil for the
diff --git a/net-nntp/sabnzbd/Manifest b/net-nntp/sabnzbd/Manifest
index 0cdbf53a38d9..272c0bcd340d 100644
--- a/net-nntp/sabnzbd/Manifest
+++ b/net-nntp/sabnzbd/Manifest
@@ -4,19 +4,19 @@ Hash: SHA256
AUX sabnzbd 281 SHA256 1224cb0157838e6d104592abd24b85eba832e23fbb57badd55e6877fd1bad17e SHA512 d3f064261c978fa4159b41636278f289bf549e2d83161652bce94e7a5ed3d1efdc3427cfdd84784bfc973ade589079417890fb8ced6eb04bad06628fbe6db66a WHIRLPOOL 6ee14687ed0a2f8be7dc7af1dd9e5d21ee07ee1788f3f7440094df9e0b28791f809ff1f9296df4771d1b50a62f19481f48ec674778a448bbb73267152d332f63
AUX sabnzbd.confd 189 SHA256 684877bf6d36927b5e51a66c5f4bf539cdbb407d570ce4a35bdd309634bd5b11 SHA512 d62a867adca670d1679a2679b038bece85618083db4b7b3cc41bb86b389ce1e12f1d003499e93be94b1046228751f8424349847acc68e35165f0e64464c157c9 WHIRLPOOL 3ea13bbea28f4b78ad35f0efdfcaed44a2748e6b58bde5156feb643027a8adca7aaf42d55cbdcb08bdaa536fac90f429dfe361ef71e6f16716c6ac1f87c208a0
AUX sabnzbd.ini 339 SHA256 4864a9a32b27f1435aec90802d0841fa459afb2734158ca5ab83e91070fc9b9e SHA512 94cd30bb1fb164aeb7f59c67de774ff0c7f4e6b46ab78cba6ed3e50dec59fd73e45c29369ecac53b5bfbaad13cc2dc132abc4822d6a596d3ba4eb0c5f7f33031 WHIRLPOOL 9a0c03787798830d57c12c504737dc607eab0946d4c029d64d14b4aebec16b3030527ade2718777a6e34ea2e637eaa743542e7c28dd4df6018c692704ea59225
-AUX sabnzbd.initd 1343 SHA256 41f143256e44b098bd19c024777ffd05468149fbe56ba47b2b1512b67975c0b9 SHA512 7c5519e967e98203cf38303fe4cda70a4f7c68e0427061f2a315eec30d00e09eac523e46dd94678811e4fc550ebaccee9d1b6cba2001a51bcc9ec70ec69388d1 WHIRLPOOL c9d412f490b67229630f31f2018ae726a76df4747283e88549c30031cb57c12c653c2c1b98def29b9239a817885a293832328208e1f6db2fc9829d5ae01e6514
+AUX sabnzbd.initd 1801 SHA256 fe4a95b6d02c1e62996813c8249f40a01c7181e8d44d1f034492cc5c34d0af20 SHA512 6a36d335199953f13a3626c8d7fc25be0a4f3c7165cb6b3c72ecb52deb242e98a50f5773ebf0bf3655146f62c4c23349258c0d427693e33db73a8af4474f1d03 WHIRLPOOL c6c2f4eb357af09e79599b031e77b0beae39abc3ee8dfbb09d7396ca7dd022a7415741692585027bebe47b9e2b54cc23322f0c32f5696aa29df4b2760ae63a00
AUX sabnzbd.logrotate 393 SHA256 276dffb9351074547d46f71699412aeb6ed80b39d0cdea499f86ebf5b8ae4f51 SHA512 26edf5095a3f69a339ecc924370becc7a26bc37ab4c31d8acf13cbcbaeb885471795ab2c69c9a434eab47886133fa781c9305c81360044f932cc280a6c491045 WHIRLPOOL 63a1ed259f44999355690fc5646b7de0f74577aefc5ad517888a2015e3d49478fb72dd9e0b52d0624812c6ecfcdc1c5d486ff6c1f921cc21bdc65b302c6f21e1
AUX use-system-configobj-and-feedparser.patch 1254 SHA256 39e01c79058f37257e6f873f0e2643631d0f7c207fad058f227cfd0833f9ca9a SHA512 c2cf92909bd171d63179e4c2cbedf3f61b26bde2944e455b9ca798dd11aca5cccb85830df9d2f5800e5a0757e5ca9b14c78a275a025838a9ade52b6219a0af27 WHIRLPOOL df4221e3322d7c48e338e6cc80ef207f1dddcdc477e2a428825d3bf9c37772c545b94bebabb86e507ecece19a6a20bfc34356f6114dad521d3ee6e75a88ba2f5
DIST SABnzbd-0.7.10-src.tar.gz 2273335 SHA256 79a44548e26147d72b3ea7a16fe198dd8e77f51d7f9093a8bac5a874fd5f5c43 SHA512 ac91e6193b678fdc4f375f5c2e582c8c222653b454e2bb00c75d2137b7a9250d8382ee8adc3e8d5b275dc091051fb3be9c0e622d143d6078dfe792e239d7d2a6 WHIRLPOOL ccd6c918f00eb1df70e7c909816a5884729d30163b1dabdb0ded0e8d61a57f22f90db677f2730a3baccae9679092d4225f97880634cf4bc282169d8ac1ab2026
DIST SABnzbd-0.7.11-src.tar.gz 2273355 SHA256 de9c22377e89b081b7c264993c159588acb86206d1b82a465554e2f9df39b311 SHA512 4a56a597652b9587771994e5a57e59fb0d716a36c90d7f4058a05061e5679a7a6a0cfcd16f6d6b673a95fa02f16983755affbb2113f0b9da947303ea6f978bb9 WHIRLPOOL d278f742110f55eaa787c54c455079c46f537540b83362670590855c5697b3c27e31e334d915554db283f6f8c9c88c46bfa7c1f5729caae2a1bc3357b0ed75a4
EBUILD sabnzbd-0.7.10.ebuild 2808 SHA256 9656b58a1c8d51aa4b3586943fddb1554eb5c4b6a4348d31ee37cd2974a12b2b SHA512 818d79e4b789641296d8651995971804522dd9317f2717ea3dc621d75d0c075b7bcfedaf4e99053cecd2743d91ec8b45cd83a70a71acf9eb38f35508e014c1ed WHIRLPOOL 35ea7f723f47c26e9e3d17bbf672606e993e456c341536cccea4c0c2fe7ce16b79ea73d06934727000a6efe251088a4a5140d3f469b5c82fb1850082ef5a650b
EBUILD sabnzbd-0.7.11.ebuild 3125 SHA256 c24a7961c56129cbe11549582b49d979c63de9487d1859e4e00192a7fbced4cd SHA512 f5c2b535edbffb5536a7ff05435599632dff324a34dcee2e8fc1e4383c1b57699f4d4df4f10513d54d0d5188be7561096f22eb2180ce63452a4d1e717e4a1d90 WHIRLPOOL 4c05a47fac80df92cee816ea0763783bd0a871377eb9aff95a19a3fced3107abda668dc9e82e7c950f5ee4178f23110f37e78b1e924dc2fbfc495a6b0b71f215
-MISC ChangeLog 1981 SHA256 0ae44b8a1e4369a7c55c6efdd785c20fa32dc2fd28d109f9de136b91502d47a3 SHA512 75d70dfccbfebf91f6318fcc173035c258c4eb212e9c0515c2249558f31aa6ea780628ce79e2877800c3c618317cec0b6cbdf7704ffb5c319fabe9bfb835c0a6 WHIRLPOOL 8837818eef73e1c44a094d9461c66913278e2e383f727d1c2e2ad40dd7e09c045425507be3f8c6cbd4e68dccc3080ba75e8115331a0bf19a820c4aedad998599
+MISC ChangeLog 2089 SHA256 d8b4749335eb32d90ca519fc0b0e74c9b8fcfcefc2b8ed8af11d40edc1ed5978 SHA512 f1f0af32288e874dc1190b5232225de5a0803a72833b23511091e415ce1a30eccdcc5300cdbdafce396fc5cfbf773ff0578c04beb9187dfbf9e2f7e6e84d0759 WHIRLPOOL fca8672fe0dbf4591ea64f6707fc460a54bb302f86f368904624e74bd6482d961396106c90c12a6f3fb72c6d9bfa98da5da91c13ebd3ad7c65a94084f06339cf
MISC metadata.xml 484 SHA256 8e26c45345b47dbcdd018d9006a4d7f42a1394da6e39e9e968b1362480ae5d7a SHA512 18630bf4e3afa57977c1c4d7f562888c3048c3778a9aff4bba2e969f3f1934d8f85c22fef30c453f5ea09f410ce16761b75c25ba7d73ce1a14ea4abffcd918a6 WHIRLPOOL a399aa5a061fba0278117af2c8e18f88bb8cb10e049ff0cc9d86d9316497dcc5c13e55ceeea03b848ab4f796665e6efa0fc3345c02a4dcbbaacdef782ab7cc2b
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
-iEYEAREIAAYFAlEmysYACgkQ4MrvBE1wQ8n/vACdH9Kpnnwy//RdawcuqExMW4yS
-JQEAniUfXW97uoCENmPfUTAVIkQoQUhU
-=bYD3
+iEYEAREIAAYFAlE5UZUACgkQ4MrvBE1wQ8kkEQCglPjaq/420/Jnq/VF4zIKcdnu
+t1kAoJDCbdBr4WMDLWP0ajh3AZYXMLJD
+=nZ6Z
-----END PGP SIGNATURE-----
diff --git a/net-nntp/sabnzbd/files/sabnzbd.initd b/net-nntp/sabnzbd/files/sabnzbd.initd
index 1a4e5631066d..64c3d9888449 100644
--- a/net-nntp/sabnzbd/files/sabnzbd.initd
+++ b/net-nntp/sabnzbd/files/sabnzbd.initd
@@ -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-nntp/sabnzbd/files/sabnzbd.initd,v 1.3 2013/02/22 01:32:26 jsbronder Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-nntp/sabnzbd/files/sabnzbd.initd,v 1.4 2013/03/08 02:46:45 jsbronder Exp $
# pid file name is hard-coded in sabnzbd, this must match
RUNDIR=/var/run/sabnzbd
@@ -37,14 +37,35 @@ start() {
stop() {
local api_key=$(awk '/^api_key =/{print $3}' ${SABNZBD_CONFIGFILE})
local hostname=${SABNZBD_SERVER}
-
+ local rc t
+
ebegin "Stopping SABnzbd"
if [ -z "${hostname}" -o "${hostname}" == "0.0.0.0" ]; then
hostname="localhost"
fi
- /usr/bin/wget -q --delete-after \
- "http://${SABNZBD_SERVER}:${SABNZBD_PORT}/sabnzbd/api?mode=shutdown&apikey=${api_key}"
- eend $?
+
+ /usr/bin/wget -q --delete-after \
+ "http://${hostname}:${SABNZBD_PORT}/sabnzbd/api?mode=shutdown&apikey=${api_key}"
+ rc=$?
+
+ if [ ${rc} -eq 0 ]; then
+ # Wait for sabnzbd to fully shutdown.
+ for ((t=0; t < 20; t++)); do
+ sleep 0.5
+ [ ! -s ${PIDFILE} ] && break
+ done
+ fi
+
+ if [ -s ${PIDFILE} ]; then
+ # Using wget didn't work, resort to start-stop-daemon
+ start-stop-daemon \
+ --stop \
+ --pidfile ${PIDFILE} \
+ --retry SIGTERM/1/SIGKILL/5
+ rc=$?
+ fi
+
+ eend ${rc}
}