public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Anthony G. Basile" <blueness@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/i2pd/files/, net-misc/i2pd/
Date: Mon,  9 May 2016 08:07:54 +0000 (UTC)	[thread overview]
Message-ID: <1462781140.77e39b3f8132f473e6addffd287b0b42f593c967.blueness@gentoo> (raw)

commit:     77e39b3f8132f473e6addffd287b0b42f593c967
Author:     Alexey Korepanov <kaikaikai <AT> yandex <DOT> ru>
AuthorDate: Tue Apr 12 13:28:41 2016 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Mon May  9 08:05:40 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=77e39b3f

net-misc/i2pd: start-stop-daemon: remove spaces in --retry

 net-misc/i2pd/files/i2pd-2.6.0-r3.initd | 46 +++++++++++++++++++++++++++++++++
 net-misc/i2pd/i2pd-2.6.0-r3.ebuild      |  2 +-
 2 files changed, 47 insertions(+), 1 deletion(-)

diff --git a/net-misc/i2pd/files/i2pd-2.6.0-r3.initd b/net-misc/i2pd/files/i2pd-2.6.0-r3.initd
new file mode 100644
index 0000000..81739e9
--- /dev/null
+++ b/net-misc/i2pd/files/i2pd-2.6.0-r3.initd
@@ -0,0 +1,46 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+description="C++ daemon for accessing the I2P network"
+description_graceful="Graceful shutdown, takes 10 minutes"
+
+command="/usr/bin/i2pd"
+command_args="${I2PD_OPTIONS}"
+user="${I2PD_USER}:${I2PD_GROUP}"
+start_stop_daemon_args="
+    --user \"${user}\"
+    --pidfile \"${I2PD_PID}\"
+    --progress --retry 'SIGTERM/20/SIGKILL/20'
+"
+I2PD_PID_DIR=$(dirname "${I2PD_PID}")
+
+extra_started_commands="graceful"
+
+depend() {
+    use dns logger netmount
+}
+
+start_pre() {
+    if [ -z "${I2PD_USER}" ] || \
+       [ -z "${I2PD_GROUP}" ] || \
+       [ -z "${I2PD_PID}" ] || \
+       [ -z "${I2PD_LOG}" ] || \
+       [ -z "${I2PD_OPTIONS}" ] ; then
+        eerror "Not all variables I2PD_USER, I2PD_GROUP, I2PD_PID, I2PD_OPTIONS, I2PD_LOG are defined."
+        eerror "Check your /etc/conf.d/i2pd."
+        return 1
+    fi
+    checkpath -f -o "${user}" "${I2PD_LOG}"
+    checkpath -d -m 0750 -o "${user}" "${I2PD_PID_DIR}"
+}
+
+graceful() {
+    # on SIGINT, i2pd stops accepting tunnels and shuts down in 600 seconds
+    ebegin "Gracefully stopping i2pd, this takes 10 minutes"
+    mark_service_stopping
+    eval start-stop-daemon --stop ${start_stop_daemon_args} \
+        --exec "${command}" --retry 'SIGINT/620/SIGTERM/20/SIGKILL/20'
+    eend $? && mark_service_stopped
+}

diff --git a/net-misc/i2pd/i2pd-2.6.0-r3.ebuild b/net-misc/i2pd/i2pd-2.6.0-r3.ebuild
index a35e3f1..a2d40f4 100644
--- a/net-misc/i2pd/i2pd-2.6.0-r3.ebuild
+++ b/net-misc/i2pd/i2pd-2.6.0-r3.ebuild
@@ -85,7 +85,7 @@ src_install() {
 
 	# openrc and systemd daemon routines
 	newconfd "${FILESDIR}/i2pd-2.6.0-r3.confd" i2pd
-	newinitd "${FILESDIR}/i2pd-2.6.0-r2.initd" i2pd
+	newinitd "${FILESDIR}/i2pd-2.6.0-r3.initd" i2pd
 	systemd_newunit "${FILESDIR}/i2pd-2.6.0-r2.service" i2pd.service
 	
 	# logrotate


             reply	other threads:[~2016-05-09  8:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-09  8:07 Anthony G. Basile [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-05-09  8:07 [gentoo-commits] repo/gentoo:master commit in: net-misc/i2pd/files/, net-misc/i2pd/ Anthony G. Basile
2016-05-09  8:07 Anthony G. Basile
2016-04-08  9:43 Anthony G. Basile
2016-04-03 20:04 Anthony G. Basile
2016-03-25  1:26 Anthony G. Basile
2016-03-24 22:31 Anthony G. Basile
2016-03-19 16:28 Anthony G. Basile
2016-02-18 19:42 Patrice Clement
2016-02-06 10:17 Patrice Clement

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=1462781140.77e39b3f8132f473e6addffd287b0b42f593c967.blueness@gentoo \
    --to=blueness@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