Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 635562 - net-analyzer/pmacct - add systemd support
Summary: net-analyzer/pmacct - add systemd support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: install-systemd-unit
  Show dependency tree
 
Reported: 2017-10-27 08:59 UTC by Olliver Schinagl
Modified: 2022-07-09 05:57 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olliver Schinagl 2017-10-27 08:59:53 UTC
pmacct does not come with an upstream systemd service file. Since upstream lacks any startup scripts, I assume it is expected that downstream adds these themselves.

Here is my current service file which seems to work for a single database config. Obviously the wants/after should probably go into the override.conf on a system that uses the database.

The file needs to be invoked the (a symlink) pmacct@interface.service directive as you cannot listen on multiple interfaces afaik.

[Unit]
Description=pmacctd service
Wants=postgresql-9.6.service
After=postgresql-9.6.service

[Service]
Type=simple
EnvironmentFile=/etc/conf.d/pmacctd
ExecStart=/usr/sbin/pmacctd $OPTS -f /etc/pmacctd/pmacctd.conf -i %I

[Install]
WantedBy=network.target
Comment 1 Olliver Schinagl 2017-10-27 09:01:23 UTC
p.s. the wants/after could potentially be expanded with sys-subsystem-net-devices-%I.device though I currently have the -w in my $OPTS to hopefully cover that ...
Comment 2 Larry the Git Cow gentoo-dev 2022-07-09 05:57:53 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dbe0331557ad48596cdad48f29f41cfbdacc26e9

commit dbe0331557ad48596cdad48f29f41cfbdacc26e9
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-07-09 05:13:51 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-07-09 05:57:43 +0000

    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>

 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(-)