summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Shkardoon <ss23@ss23.geek.nz>2018-01-21 08:46:41 +1300
committerJason Zaman <perfinion@gentoo.org>2018-01-21 12:04:15 +0800
commit427400b35fe4f1d1cafbad62458e2f5faae8b7e0 (patch)
tree8f9484452847121a88c91cb47a2a7021d4e48785 /net-p2p
parentkde-misc/krename: version bump 4.90.90 (diff)
downloadgentoo-427400b35fe4f1d1cafbad62458e2f5faae8b7e0.tar.gz
gentoo-427400b35fe4f1d1cafbad62458e2f5faae8b7e0.tar.bz2
gentoo-427400b35fe4f1d1cafbad62458e2f5faae8b7e0.zip
net-p2p/rtorrent: Fix init script to ensure PID file is created
By only replacing the PID in the stop action, we can ensure start-stop-daemon had time to create the PID file. Closes: https://bugs.gentoo.org/634852 Package-Manager: Portage-2.3.19, Repoman-2.3.6
Diffstat (limited to 'net-p2p')
-rw-r--r--net-p2p/rtorrent/files/rtorrentd.init5
1 files changed, 3 insertions, 2 deletions
diff --git a/net-p2p/rtorrent/files/rtorrentd.init b/net-p2p/rtorrent/files/rtorrentd.init
index 06fab7d20846..83943cd56611 100644
--- a/net-p2p/rtorrent/files/rtorrentd.init
+++ b/net-p2p/rtorrent/files/rtorrentd.init
@@ -21,13 +21,14 @@ start() {
--env HOME="${PWHOME:-/home/$USER}" \
--name rtorrent \
--exec /usr/bin/screen -- -D -m -S rtorrentd /usr/bin/rtorrent
- # Because we've daemonized with screen, we need to replace the PID file with the real PID of rtorrent
- pgrep -P $(cat /var/run/rtorrentd.pid) > /var/run/rtorrentd.pid
eend $?
}
stop() {
ebegin "Stopping rtorrent"
+ # Because we've daemonized with screen, we need to replace the PID file with the real PID of rtorrent
+ pgrep -P $(cat /var/run/rtorrentd.pid) > /var/run/rtorrentd.pid
+
start-stop-daemon --stop --signal 15 \
--pidfile /var/run/rtorrentd.pid
eend $?