diff options
author | Sam James <sam@gentoo.org> | 2022-07-09 06:13:51 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-07-09 06:57:43 +0100 |
commit | dbe0331557ad48596cdad48f29f41cfbdacc26e9 (patch) | |
tree | 22712569953c9ddaf42259fd6f5cbc8d91f97cf9 /net-analyzer/pmacct | |
parent | net-analyzer/pmacct: add github upstream metadata (diff) | |
download | gentoo-dbe0331557ad48596cdad48f29f41cfbdacc26e9.tar.gz gentoo-dbe0331557ad48596cdad48f29f41cfbdacc26e9.tar.bz2 gentoo-dbe0331557ad48596cdad48f29f41cfbdacc26e9.zip |
net-analyzer/pmacct: add systemd units
Borrowed from opensuse then adapted.
Closes: https://bugs.gentoo.org/635562
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-analyzer/pmacct')
-rw-r--r-- | net-analyzer/pmacct/files/nfacctd.service | 18 | ||||
-rw-r--r-- | net-analyzer/pmacct/files/pmacctd.service | 19 | ||||
-rw-r--r-- | net-analyzer/pmacct/files/sfacctd.service | 18 | ||||
-rw-r--r-- | net-analyzer/pmacct/pmacct-1.7.7-r1.ebuild (renamed from net-analyzer/pmacct/pmacct-1.7.7.ebuild) | 4 | ||||
-rw-r--r-- | 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 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 } |