aboutsummaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2024-11-07 11:32:31 +0100
committerToni Uhlig <matzeton@googlemail.com>2024-11-07 11:32:42 +0100
commita733d536adeaf6afed3bb96bbc7f822f49802bd3 (patch)
tree70ee425c0fa5deaceafa26232c512e09fba1e3a1 /packages
parent9fc35e7a7e29d9a346865651387a02514080c6b4 (diff)
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>
Diffstat (limited to 'packages')
-rw-r--r--packages/systemd/ndpid@.service.in1
-rw-r--r--packages/systemd/ndpisrvd.service.in2
2 files changed, 3 insertions, 0 deletions
diff --git a/packages/systemd/ndpid@.service.in b/packages/systemd/ndpid@.service.in
index b59a6612c..5bdd0f1bb 100644
--- a/packages/systemd/ndpid@.service.in
+++ b/packages/systemd/ndpid@.service.in
@@ -8,6 +8,7 @@ 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
diff --git a/packages/systemd/ndpisrvd.service.in b/packages/systemd/ndpisrvd.service.in
index 89f87a682..b74e9af38 100644
--- a/packages/systemd/ndpisrvd.service.in
+++ b/packages/systemd/ndpisrvd.service.in
@@ -6,8 +6,10 @@ After=network.target
Type=simple
ExecStartPre=/bin/sh -c 'test -r "@CMAKE_INSTALL_PREFIX@/etc/nDPId/nDPIsrvd.conf" || cp -v "@CMAKE_INSTALL_PREFIX@/share/nDPId/ndpisrvd.conf.example" "@CMAKE_INSTALL_PREFIX@/etc/nDPId/nDPIsrvd.conf"'
ExecStartPre=/bin/sh -c 'mkdir -p /run/nDPIsrvd && chown root:root /run/nDPIsrvd && chmod 0775 /run/nDPIsrvd'
+ExecStopPost=/bin/sh -c 'rm -f /run/nDPIsrvd/collector /run/nDPIsrvd/distributor'
ExecStart=@CMAKE_INSTALL_PREFIX@/bin/nDPIsrvd -f @CMAKE_INSTALL_PREFIX@/etc/nDPId/nDPIsrvd.conf -u ndpisrvd -c /run/nDPIsrvd/collector -s /run/nDPIsrvd/distributor -G ndpid:ndpisrvd-distributor
Restart=on-failure
+Environment="NDPID_STARTED_BY_SYSTEMD="
[Install]
WantedBy=multi-user.target