commit:     97f03506d9dd795537f2af986aab17ea2f8e5d5a
Author:     Conrad Kostecki <conrad <AT> kostecki <DOT> com>
AuthorDate: Tue Dec 11 08:44:08 2018 +0000
Commit:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Tue Dec 18 04:18:38 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=97f03506

net-misc/igmpproxy: update pidfile handling

Since IGMPProxy does not create a pid file by itself,
the daemon needs to be started in foreground, to keep
tracking of the correct pidfile with openrc and put it
background.

Closes: https://bugs.gentoo.org/672842
Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: Conrad Kostecki <conrad <AT> kostecki.com>
Closes: https://github.com/gentoo/gentoo/pull/10610
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>

 net-misc/igmpproxy/files/igmpproxy.initd-r1  | 12 ++++++++++++
 net-misc/igmpproxy/igmpproxy-0.2.1-r2.ebuild | 25 +++++++++++++++++++++++++
 2 files changed, 37 insertions(+)

diff --git a/net-misc/igmpproxy/files/igmpproxy.initd-r1 
b/net-misc/igmpproxy/files/igmpproxy.initd-r1
new file mode 100644
index 00000000000..c5f9e56536a
--- /dev/null
+++ b/net-misc/igmpproxy/files/igmpproxy.initd-r1
@@ -0,0 +1,12 @@
+#!/sbin/openrc-run
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+config="/etc/${RC_SVCNAME}.conf"
+name="IGMPproxy"
+pidfile="/run/${RC_SVCNAME}.pid"
+
+command="/usr/sbin/igmpproxy"
+command_args="${IGMPPROXY_OPTS} -n ${config}"
+command_background="true"
+required_files="${config}"

diff --git a/net-misc/igmpproxy/igmpproxy-0.2.1-r2.ebuild 
b/net-misc/igmpproxy/igmpproxy-0.2.1-r2.ebuild
new file mode 100644
index 00000000000..5583e140a41
--- /dev/null
+++ b/net-misc/igmpproxy/igmpproxy-0.2.1-r2.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit linux-info systemd
+
+DESCRIPTION="A multicast routing daemon which uses IGMP forwarding"
+HOMEPAGE="https://github.com/pali/igmpproxy";
+SRC_URI="https://github.com/pali/igmpproxy/releases/download/${PV}/${P}.tar.gz";
+
+KEYWORDS="~amd64 ~x86"
+LICENSE="GPL-2+"
+SLOT="0"
+
+CONFIG_CHECK="~IP_MULTICAST ~IP_MROUTE"
+
+src_install() {
+       default
+
+       newinitd "${FILESDIR}"/igmpproxy.initd-r1 igmpproxy
+       systemd_dounit "${FILESDIR}"/"${PN}".service
+
+       newconfd "${FILESDIR}"/igmpproxy.confd igmpproxy
+}

Reply via email to