From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A2A791396D0 for ; Thu, 5 Oct 2017 21:37:47 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id F34292BC00B; Thu, 5 Oct 2017 21:37:46 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B0D2F2BC00B for ; Thu, 5 Oct 2017 21:37:46 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D4D6E341785 for ; Thu, 5 Oct 2017 21:37:45 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 4A706746E for ; Thu, 5 Oct 2017 21:37:44 +0000 (UTC) From: "Sven Wegener" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sven Wegener" Message-ID: <1507239344.2b41864cd150b5dd1c5c45478c287ec87676f6e3.swegener@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-nntp/nzbget/files/, net-nntp/nzbget/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-nntp/nzbget/files/nzbget.initd-r1 net-nntp/nzbget/nzbget-20.0_pre2108-r1.ebuild net-nntp/nzbget/nzbget-20.0_pre2108.ebuild X-VCS-Directories: net-nntp/nzbget/files/ net-nntp/nzbget/ X-VCS-Committer: swegener X-VCS-Committer-Name: Sven Wegener X-VCS-Revision: 2b41864cd150b5dd1c5c45478c287ec87676f6e3 X-VCS-Branch: master Date: Thu, 5 Oct 2017 21:37:44 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 551543a7-968d-476a-8319-71d4332b1920 X-Archives-Hash: 00297e3da2e4254b1a7a40bf9ae266bf commit: 2b41864cd150b5dd1c5c45478c287ec87676f6e3 Author: Louis Sautier gmail com> AuthorDate: Wed Oct 4 10:11:42 2017 +0000 Commit: Sven Wegener gentoo 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 }