diff options
Diffstat (limited to 'packages/systemd/ndpisrvd.service.in')
-rw-r--r-- | packages/systemd/ndpisrvd.service.in | 13 |
1 files changed, 13 insertions, 0 deletions
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 |