Davide Pesavento | 0da3eab | 2019-01-31 01:10:00 -0500 | [diff] [blame^] | 1 | # 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] |
| 23 | Description=NDN Link State Routing Daemon |
| 24 | Documentation=man:nlsr(1) |
| 25 | BindsTo=nfd.service |
| 26 | After=nfd.service |
| 27 | |
| 28 | [Service] |
| 29 | Environment=HOME=%S/ndn/nlsr |
| 30 | ExecStart=@BINDIR@/nlsr -f @SYSCONFDIR@/ndn/nlsr.conf |
| 31 | Restart=on-failure |
| 32 | RestartPreventExitStatus=2 |
| 33 | User=nlsr |
| 34 | |
| 35 | LockPersonality=yes |
| 36 | MemoryDenyWriteExecute=yes |
| 37 | NoNewPrivileges=yes |
| 38 | PrivateDevices=yes |
| 39 | PrivateTmp=yes |
| 40 | PrivateUsers=yes |
| 41 | ProtectControlGroups=yes |
| 42 | ProtectHome=yes |
| 43 | ProtectKernelModules=yes |
| 44 | ProtectKernelTunables=yes |
| 45 | ProtectSystem=strict |
| 46 | RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 |
| 47 | RestrictNamespaces=yes |
| 48 | RestrictRealtime=yes |
| 49 | # "nlsr" is the state-dir, "ndn/nlsr" is the HOME |
| 50 | StateDirectory=nlsr ndn/nlsr |
| 51 | SystemCallArchitectures=native |
| 52 | SystemCallErrorNumber=EPERM |
| 53 | SystemCallFilter=~@clock @cpu-emulation @debug @module @mount @obsolete @privileged @raw-io @reboot @setuid @swap |
| 54 | |
| 55 | [Install] |
| 56 | WantedBy=multi-user.target |
| 57 | WantedBy=nfd.service |