Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 591498 - net-analyzer/pnp4nagios: add systemd service
Summary: net-analyzer/pnp4nagios: add systemd service
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Sysadmin Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-17 13:55 UTC by Richard Nespithal (rndevfx)
Modified: 2017-11-03 13:41 UTC (History)
1 user (show)

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


Attachments
npcd.service (npcd.service,224 bytes, text/plain)
2016-08-17 13:55 UTC, Richard Nespithal (rndevfx)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Nespithal (rndevfx) 2016-08-17 13:55:49 UTC
Created attachment 443602 [details]
npcd.service

I attached a service to start / reload npcd with systemd.
Comment 1 Michael Orlitzky gentoo-dev 2017-11-03 13:19:21 UTC
Hi, I'm planning on adding this, but I've been working on some other issues and I noticed that (just yesterday) someone added a systemd service to the upstream project:

https://github.com/lingej/pnp4nagios/blob/master/scripts/npcd.service.in

The differences are,

  * Yours sets "After=syslog.target".
  * The upstream one specifies a user/group.

Both use the (default) "simple" service type, which I'm not sure about. I'll have to ask upstream -- often, forking daemons will do some stuff as root before dropping to an unprivileged user account. By specifying a User and Group, we may be preventing that. And of course, the PID will be wrong if the daemon still forks even though it's not running as root.

I don't personally use npcd, so I'll ask about these things on Github.
Comment 2 Michael Orlitzky gentoo-dev 2017-11-03 13:21:45 UTC
Oh, and so I don't forget,

  * Yours also has the "reload" command.
Comment 3 Michael Orlitzky gentoo-dev 2017-11-03 13:41:06 UTC
I commented on the commit,

https://github.com/lingej/pnp4nagios/commit/e4e5d3dbc94c662c1d6a6d4e4c070cb93a534e62