Files
nDPId/packages/systemd/ndpid@.service.in
Toni Uhlig a733d536ad Added env check NDPID_STARTED_BY_SYSTEMD to prevent logging to stderr in such a case
* removed `nDPId` shutdown on poll/epoll error
 * fixed `chmod_chown()` rv check

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2024-11-07 11:32:42 +01:00

15 lines
533 B
SYSTEMD

[Unit]
Description=nDPId Service on interface %i
After=ndpisrvd.service
Requires=ndpisrvd.service
[Service]
Type=simple
ExecStartPre=/bin/sh -c 'test -r "@CMAKE_INSTALL_PREFIX@/etc/nDPId/%i.conf" || cp -v "@CMAKE_INSTALL_PREFIX@/share/nDPId/ndpid.conf.example" "@CMAKE_INSTALL_PREFIX@/etc/nDPId/%i.conf"'
ExecStart=@CMAKE_INSTALL_PREFIX@/sbin/nDPId -f @CMAKE_INSTALL_PREFIX@/etc/nDPId/%i.conf -i %i -u ndpid -c /run/nDPIsrvd/collector
Restart=on-failure
Environment="NDPID_STARTED_BY_SYSTEMD="
[Install]
WantedBy=multi-user.target