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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A686A158096 for ; Sat, 9 Jul 2022 05:58:00 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4BE8DE0869; Sat, 9 Jul 2022 05:57:58 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 27657E0869 for ; Sat, 9 Jul 2022 05:57:58 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1C14A340E43 for ; Sat, 9 Jul 2022 05:57:57 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6F2BA523 for ; Sat, 9 Jul 2022 05:57:55 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1657346263.dbe0331557ad48596cdad48f29f41cfbdacc26e9.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/pmacct/files/, net-analyzer/pmacct/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-analyzer/pmacct/files/nfacctd.service net-analyzer/pmacct/files/pmacctd.service net-analyzer/pmacct/files/sfacctd.service net-analyzer/pmacct/pmacct-1.7.7-r1.ebuild net-analyzer/pmacct/pmacct-1.7.7.ebuild net-analyzer/pmacct/pmacct-9999.ebuild X-VCS-Directories: net-analyzer/pmacct/ net-analyzer/pmacct/files/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: dbe0331557ad48596cdad48f29f41cfbdacc26e9 X-VCS-Branch: master Date: Sat, 9 Jul 2022 05:57:55 +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-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: d3ad72cb-32ff-4128-8a4b-4adb57b744e6 X-Archives-Hash: 2b80da1249e42b38f30ee88bae01670d commit: dbe0331557ad48596cdad48f29f41cfbdacc26e9 Author: Sam James gentoo org> AuthorDate: Sat Jul 9 05:13:51 2022 +0000 Commit: Sam James gentoo org> CommitDate: Sat Jul 9 05:57:43 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dbe03315 net-analyzer/pmacct: add systemd units Borrowed from opensuse then adapted. Closes: https://bugs.gentoo.org/635562 Signed-off-by: Sam James gentoo.org> net-analyzer/pmacct/files/nfacctd.service | 18 ++++++++++++++++++ net-analyzer/pmacct/files/pmacctd.service | 19 +++++++++++++++++++ net-analyzer/pmacct/files/sfacctd.service | 18 ++++++++++++++++++ .../{pmacct-1.7.7.ebuild => pmacct-1.7.7-r1.ebuild} | 4 +++- net-analyzer/pmacct/pmacct-9999.ebuild | 4 +++- 5 files changed, 61 insertions(+), 2 deletions(-) diff --git a/net-analyzer/pmacct/files/nfacctd.service b/net-analyzer/pmacct/files/nfacctd.service new file mode 100644 index 000000000000..d649f47030bf --- /dev/null +++ b/net-analyzer/pmacct/files/nfacctd.service @@ -0,0 +1,18 @@ +[Unit] +Description=netflow accounting daemon +After=network.target + +[Service] +ProtectSystem=full +ProtectHome=true +ProtectHostname=true +ProtectKernelTunables=true +ProtectKernelModules=true +ProtectKernelLogs=true +ProtectControlGroups=true +RestrictRealtime=true +Type=forking +ExecStart=/usr/sbin/nfacctd -f /etc/pmacctd/nfacctd.conf -i %I + +[Install] +WantedBy=multi-user.target diff --git a/net-analyzer/pmacct/files/pmacctd.service b/net-analyzer/pmacct/files/pmacctd.service new file mode 100644 index 000000000000..a2dbb8c45846 --- /dev/null +++ b/net-analyzer/pmacct/files/pmacctd.service @@ -0,0 +1,19 @@ +[Unit] +Description=promiscuous mode accounting daemon +After=network.target + +[Service] +ProtectSystem=full +ProtectHome=true +ProtectHostname=true +ProtectKernelTunables=true +ProtectKernelModules=true +ProtectKernelLogs=true +ProtectControlGroups=true +RestrictRealtime=true +Type=forking +ExecStart=/usr/sbin/pmacctd -f /etc/pmacctd/pmacctd.conf -i %I + +[Install] +WantedBy=multi-user.target + diff --git a/net-analyzer/pmacct/files/sfacctd.service b/net-analyzer/pmacct/files/sfacctd.service new file mode 100644 index 000000000000..7a334e0ffadd --- /dev/null +++ b/net-analyzer/pmacct/files/sfacctd.service @@ -0,0 +1,18 @@ +[Unit] +Description=sflow accounting daemon +After=network.target + +[Service] +ProtectSystem=full +ProtectHome=true +ProtectHostname=true +ProtectKernelTunables=true +ProtectKernelModules=true +ProtectKernelLogs=true +ProtectControlGroups=true +RestrictRealtime=true +Type=forking +ExecStart=/usr/sbin/sfacctd -f /etc/pmacctd/sfacctd.conf -i %I + +[Install] +WantedBy=multi-user.target diff --git a/net-analyzer/pmacct/pmacct-1.7.7.ebuild b/net-analyzer/pmacct/pmacct-1.7.7-r1.ebuild similarity index 95% rename from net-analyzer/pmacct/pmacct-1.7.7.ebuild rename to net-analyzer/pmacct/pmacct-1.7.7-r1.ebuild index 687b4ef7d8f2..55db903b6abd 100644 --- a/net-analyzer/pmacct/pmacct-1.7.7.ebuild +++ b/net-analyzer/pmacct/pmacct-1.7.7-r1.ebuild @@ -3,7 +3,7 @@ EAPI=8 -inherit autotools toolchain-funcs +inherit autotools toolchain-funcs systemd DESCRIPTION="A network tool to gather IP traffic information" HOMEPAGE="http://www.pmacct.net/" @@ -102,6 +102,8 @@ src_install() { newinitd "${FILESDIR}"/pmacctd-init.d pmacctd newconfd "${FILESDIR}"/pmacctd-conf.d pmacctd + systemd_dounit "${FILESDIR}"/{nfacctd,pmacctd,sfacctd}.service + insinto /etc/pmacctd newins examples/pmacctd-imt.conf.example pmacctd.conf } diff --git a/net-analyzer/pmacct/pmacct-9999.ebuild b/net-analyzer/pmacct/pmacct-9999.ebuild index 687b4ef7d8f2..55db903b6abd 100644 --- a/net-analyzer/pmacct/pmacct-9999.ebuild +++ b/net-analyzer/pmacct/pmacct-9999.ebuild @@ -3,7 +3,7 @@ EAPI=8 -inherit autotools toolchain-funcs +inherit autotools toolchain-funcs systemd DESCRIPTION="A network tool to gather IP traffic information" HOMEPAGE="http://www.pmacct.net/" @@ -102,6 +102,8 @@ src_install() { newinitd "${FILESDIR}"/pmacctd-init.d pmacctd newconfd "${FILESDIR}"/pmacctd-conf.d pmacctd + systemd_dounit "${FILESDIR}"/{nfacctd,pmacctd,sfacctd}.service + insinto /etc/pmacctd newins examples/pmacctd-imt.conf.example pmacctd.conf }