blob: 9cce7400204a730f1e714708a7a1be81412d12bc [file] [log] [blame]
Davide Pesavento0da3eab2019-01-31 01:10:00 -05001# Copyright (c) 2014-2019, The University of Memphis,
2# Regents of the University of California,
3# Arizona Board of Regents.
4#
5# This file is part of NLSR (Named-data Link State Routing).
6# See AUTHORS.md for complete list of NLSR authors and contributors.
7#
8# NLSR is free software: you can redistribute it and/or modify it under the terms
9# of the GNU General Public License as published by the Free Software Foundation,
10# either version 3 of the License, or (at your option) any later version.
11#
12# NLSR is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
13# without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14# PURPOSE. See the GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License along with
17# NLSR, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
18#
19# Author: Eric Newberry <enewberry@email.arizona.edu>
20# Author: Davide Pesavento <davidepesa@gmail.com>
21
22[Unit]
23Description=NDN Link State Routing Daemon
24Documentation=man:nlsr(1)
25BindsTo=nfd.service
26After=nfd.service
27
28[Service]
29Environment=HOME=%S/ndn/nlsr
30ExecStart=@BINDIR@/nlsr -f @SYSCONFDIR@/ndn/nlsr.conf
31Restart=on-failure
32RestartPreventExitStatus=2
33User=nlsr
34
35LockPersonality=yes
36MemoryDenyWriteExecute=yes
37NoNewPrivileges=yes
38PrivateDevices=yes
39PrivateTmp=yes
40PrivateUsers=yes
41ProtectControlGroups=yes
42ProtectHome=yes
43ProtectKernelModules=yes
44ProtectKernelTunables=yes
45ProtectSystem=strict
46RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
47RestrictNamespaces=yes
48RestrictRealtime=yes
49# "nlsr" is the state-dir, "ndn/nlsr" is the HOME
50StateDirectory=nlsr ndn/nlsr
51SystemCallArchitectures=native
52SystemCallErrorNumber=EPERM
53SystemCallFilter=~@clock @cpu-emulation @debug @module @mount @obsolete @privileged @raw-io @reboot @setuid @swap
54
55[Install]
56WantedBy=multi-user.target
57WantedBy=nfd.service