public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sven Wegener" <swegener@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-nntp/nzbget/files/, net-nntp/nzbget/
Date: Thu,  5 Oct 2017 21:37:44 +0000 (UTC)	[thread overview]
Message-ID: <1507239344.2b41864cd150b5dd1c5c45478c287ec87676f6e3.swegener@gentoo> (raw)

commit:     2b41864cd150b5dd1c5c45478c287ec87676f6e3
Author:     Louis Sautier <sautier.louis <AT> gmail <DOT> com>
AuthorDate: Wed Oct  4 10:11:42 2017 +0000
Commit:     Sven Wegener <swegener <AT> gentoo <DOT> org>
CommitDate: Thu Oct  5 21:35:44 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2b41864c

net-nntp/nzbget: improve init script to use a pid file, add depend

It seems that the older behaviour did not work with recent openrc
versions. The process could not be found when running the stop command.
We don't need to override LockFile in the configuration file any more
since we set it when we start the daemon.

Package-Manager: Portage-2.3.8, Repoman-2.3.3
[swegener: separate init script revision]

 net-nntp/nzbget/files/nzbget.initd-r1              | 28 ++++++++++++++++++++++
 ...re2108.ebuild => nzbget-20.0_pre2108-r1.ebuild} |  3 +--
 2 files changed, 29 insertions(+), 2 deletions(-)

diff --git a/net-nntp/nzbget/files/nzbget.initd-r1 b/net-nntp/nzbget/files/nzbget.initd-r1
new file mode 100644
index 00000000000..2a9fae6c32b
--- /dev/null
+++ b/net-nntp/nzbget/files/nzbget.initd-r1
@@ -0,0 +1,28 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+extra_started_commands="reload"
+
+description="A command-line based binary newsgrabber supporting .nzb files"
+pidfile=/run/nzbget/nzbget.pid
+command=/usr/bin/nzbget
+command_args="--configfile \"${NZBGET_CONFIGFILE}\" \
+  --daemon --option LockFile=${pidfile} \
+  ${NZBGET_OPTS}"
+start_stop_daemon_args="--user \"${NZBGET_USER}\" \
+  --group \"${NZBGET_GROUP}\""
+
+depend() {
+  need localmount net
+}
+
+start_pre() {
+  checkpath -d -m 0755 -o "${NZBGET_USER}":"${NZBGET_GROUP}" /run/nzbget
+}
+
+reload() {
+  ebegin "Reloading ${RC_SVCNAME}"
+  ${command} --configfile "${NZBGET_CONFIGFILE}" --reload >/dev/null
+  eend $?
+}

diff --git a/net-nntp/nzbget/nzbget-20.0_pre2108.ebuild b/net-nntp/nzbget/nzbget-20.0_pre2108-r1.ebuild
similarity index 96%
rename from net-nntp/nzbget/nzbget-20.0_pre2108.ebuild
rename to net-nntp/nzbget/nzbget-20.0_pre2108-r1.ebuild
index c6d86f04383..3e119a13d9e 100644
--- a/net-nntp/nzbget/nzbget-20.0_pre2108.ebuild
+++ b/net-nntp/nzbget/nzbget-20.0_pre2108-r1.ebuild
@@ -58,7 +58,6 @@ src_prepare() {
 
 	sed \
 		-e 's:^MainDir=.*:MainDir=/var/lib/nzbget:' \
-		-e 's:^LockFile=.*:LockFile=/run/nzbget/nzbget.pid:' \
 		-e 's:^LogFile=.*:LogFile=/var/log/nzbget/nzbget.log:' \
 		-e 's:^WebDir=.*:WebDir=/usr/share/nzbget/webui:' \
 		-e 's:^ConfigTemplate=.*:ConfigTemplate=/usr/share/nzbget/nzbget.conf:' \
@@ -91,7 +90,7 @@ src_install() {
 	keepdir /var/lib/nzbget/{dst,nzb,queue,tmp}
 	keepdir /var/log/nzbget
 
-	newinitd "${FILESDIR}"/nzbget.initd nzbget
+	newinitd "${FILESDIR}"/nzbget.initd-r1 nzbget
 	newconfd "${FILESDIR}"/nzbget.confd nzbget
 }
 


             reply	other threads:[~2017-10-05 21:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-05 21:37 Sven Wegener [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-02-24 22:17 [gentoo-commits] repo/gentoo:master commit in: net-nntp/nzbget/files/, net-nntp/nzbget/ Louis Sautier
2024-07-17  1:09 Louis Sautier
2022-08-24 10:42 Louis Sautier
2017-06-23 22:29 Sven Wegener
2016-03-24 16:36 Sven Wegener

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1507239344.2b41864cd150b5dd1c5c45478c287ec87676f6e3.swegener@gentoo \
    --to=swegener@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox