From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id A20BD1388C3 for ; Wed, 6 Jan 2016 21:05:49 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E632621C011; Wed, 6 Jan 2016 21:05:47 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 03B1E21C010 for ; Wed, 6 Jan 2016 21:05:46 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D11F6340A1E for ; Wed, 6 Jan 2016 21:05:45 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id BA456C7B for ; Wed, 6 Jan 2016 21:05:43 +0000 (UTC) From: "Patrice Clement" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Patrice Clement" Message-ID: <1452040592.4dc117d84e726d600656284b510303cc521f3c99.monsieurp@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-nntp/nzbget/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-nntp/nzbget/files/nzbget.initd X-VCS-Directories: net-nntp/nzbget/files/ X-VCS-Committer: monsieurp X-VCS-Committer-Name: Patrice Clement X-VCS-Revision: 4dc117d84e726d600656284b510303cc521f3c99 X-VCS-Branch: master Date: Wed, 6 Jan 2016 21:05:43 +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: 4a4ef0b2-eedc-42f6-8913-3926e6de70d4 X-Archives-Hash: 632d2e47d6bde07e1eae9e02b82dd25f commit: 4dc117d84e726d600656284b510303cc521f3c99 Author: Louis Sautier gmail com> AuthorDate: Wed Jan 6 00:36:32 2016 +0000 Commit: Patrice Clement gentoo org> CommitDate: Wed Jan 6 00:36:32 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4dc117d8 net-nntp/nzbget: improve init script #550600 Package-Manager: portage-2.2.26 net-nntp/nzbget/files/nzbget.initd | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/net-nntp/nzbget/files/nzbget.initd b/net-nntp/nzbget/files/nzbget.initd index 736e7a5..c533da1 100644 --- a/net-nntp/nzbget/files/nzbget.initd +++ b/net-nntp/nzbget/files/nzbget.initd @@ -3,11 +3,11 @@ # Distributed under the terms of the GNU General Public License v2 # $Id$ -extra_started_commands="pause unpause" +extra_started_commands="reload" start() { - ebegin "Starting nzbget" - checkpath -d -m 0755 -o "${NZBGET_USER}:${NZBGET_GROUP}" /run/nzbget + ebegin "Starting ${RC_SVCNAME}" + checkpath -d -m 0755 -o "${NZBGET_USER}":"${NZBGET_GROUP}" /run/nzbget start-stop-daemon --quiet --start --user "${NZBGET_USER}" \ --group "${NZBGET_GROUP}" --exec /usr/bin/nzbget -- \ --configfile "${NZBGET_CONFIGFILE}" --daemon \ @@ -16,19 +16,14 @@ start() { } stop() { - ebegin "Stopping nzbget" - /usr/bin/nzbget --configfile "${NZBGET_CONFIGFILE}" --quit >/dev/null - eend $? -} - -pause() { - ebegin "Pausing nzbget" - /usr/bin/nzbget --configfile "${NZBGET_CONFIGFILE}" --pause >/dev/null - eend $? + ebegin "Stopping ${RC_SVCNAME}" + start-stop-daemon --stop --exec /usr/bin/nzbget -- \ + --configfile "${NZBGET_CONFIGFILE}" --daemon \ + -- ${NZBGET_OPTS} } -unpause() { - ebegin "Unpausing nzbget" - /usr/bin/nzbget --configfile "${NZBGET_CONFIGFILE}" --unpause >/dev/null +reload() { + ebegin "Reloading ${RC_SVCNAME}" + /usr/bin/nzbget --configfile "${NZBGET_CONFIGFILE}" --reload >/dev/null eend $? }