diff options
Diffstat (limited to 'packages/systemd')
-rw-r--r-- | packages/systemd/ndpid@.service.in | 13 | ||||
-rw-r--r-- | packages/systemd/ndpisrvd.service.in | 13 |
2 files changed, 26 insertions, 0 deletions
diff --git a/packages/systemd/ndpid@.service.in b/packages/systemd/ndpid@.service.in new file mode 100644 index 000000000..b59a6612c --- /dev/null +++ b/packages/systemd/ndpid@.service.in @@ -0,0 +1,13 @@ +[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 + +[Install] +WantedBy=multi-user.target diff --git a/packages/systemd/ndpisrvd.service.in b/packages/systemd/ndpisrvd.service.in new file mode 100644 index 000000000..89f87a682 --- /dev/null +++ b/packages/systemd/ndpisrvd.service.in @@ -0,0 +1,13 @@ +[Unit] +Description=nDPIsrvd Service +After=network.target + +[Service] +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' +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 + +[Install] +WantedBy=multi-user.target |