Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 591498

Summary: net-analyzer/pnp4nagios: add systemd service
Product: Gentoo Linux Reporter: Richard Nespithal (rndevfx) <richard>
Component: Current packagesAssignee: Sysadmin Bugs <sysadmin>
Status: CONFIRMED ---    
Severity: normal CC: mjo
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: npcd.service

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