Files
ndn-traffic-generator/systemd/ndn-traffic-server.service.in
T
Davide Pesavento e5a7394258 Add systemd unit files
Change-Id: I17322ef7eda1f3bf0bc53b887508fadf039250cc
2019-01-28 01:51:22 -05:00

43 lines
1.3 KiB
Plaintext

[Unit]
Description=NDN Traffic Generator Server
BindsTo=nfd.service
After=nfd.service
[Service]
Environment=HOME=%S/ndn/ndn-traffic-server
EnvironmentFile=-@SYSCONFDIR@/default/ndn-traffic-server
ExecStart=@BINDIR@/ndn-traffic-server @SYSCONFDIR@/ndn/ndn-traffic-server.conf $FLAGS
Restart=on-failure
RestartPreventExitStatus=2
User=ndn-traffic-generator
CapabilityBoundingSet=
LockPersonality=yes
MemoryDenyWriteExecute=yes
NoNewPrivileges=yes
PrivateDevices=yes
PrivateNetwork=yes
PrivateTmp=yes
PrivateUsers=yes
ProtectControlGroups=yes
ProtectHome=yes
ProtectKernelModules=yes
ProtectKernelTunables=yes
# systemd older than v232 doesn't support a value of "strict" for ProtectSystem,
# so it will ignore that line and use ProtectSystem=full; with newer systemd,
# the latter assignment is recognized and takes precedence, resulting in an
# effective setting of ProtectSystem=strict
ProtectSystem=full
ProtectSystem=strict
RestrictAddressFamilies=AF_UNIX
RestrictNamespaces=yes
RestrictRealtime=yes
StateDirectory=ndn/ndn-traffic-server
SystemCallArchitectures=native
SystemCallErrorNumber=EPERM
SystemCallFilter=~@aio @chown @clock @cpu-emulation @debug @keyring @module @mount @obsolete @privileged @raw-io @reboot @resources @setuid @swap
[Install]
WantedBy=multi-user.target
WantedBy=nfd.service