Davide Pesavento | cb903ea | 2019-01-16 16:31:00 -0500 | [diff] [blame] | 1 | # Copyright (c) 2015-2019, Regents of the University of California, |
| 2 | # Arizona Board of Regents, |
| 3 | # Colorado State University, |
| 4 | # University Pierre & Marie Curie, Sorbonne University, |
| 5 | # Washington University in St. Louis, |
| 6 | # Beijing Institute of Technology, |
| 7 | # The University of Memphis. |
| 8 | # |
| 9 | # This file is part of ndn-tools (Named Data Networking Essential Tools). |
| 10 | # See AUTHORS.md for complete list of ndn-tools authors and contributors. |
| 11 | # |
| 12 | # ndn-tools is free software: you can redistribute it and/or modify it under the terms |
| 13 | # of the GNU General Public License as published by the Free Software Foundation, |
| 14 | # either version 3 of the License, or (at your option) any later version. |
| 15 | # |
| 16 | # ndn-tools is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; |
| 17 | # without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR |
| 18 | # PURPOSE. See the GNU General Public License for more details. |
| 19 | # |
| 20 | # You should have received a copy of the GNU General Public License along with |
| 21 | # ndn-tools, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>. |
| 22 | |
| 23 | [Unit] |
| 24 | Description=NDN Ping Server |
| 25 | Documentation=man:ndnpingserver(1) |
| 26 | BindsTo=nfd.service |
| 27 | After=nfd.service |
| 28 | |
| 29 | [Service] |
| 30 | Environment=HOME=%S/ndn/ndnping |
| 31 | EnvironmentFile=-@SYSCONFDIR@/default/ndnping |
| 32 | ExecStart=@BINDIR@/ndnpingserver ${PREFIX} $FLAGS |
| 33 | Restart=on-failure |
| 34 | RestartPreventExitStatus=2 |
| 35 | User=ndn |
| 36 | |
| 37 | CapabilityBoundingSet= |
| 38 | LockPersonality=yes |
| 39 | MemoryDenyWriteExecute=yes |
| 40 | NoNewPrivileges=yes |
| 41 | PrivateDevices=yes |
| 42 | PrivateNetwork=yes |
| 43 | PrivateTmp=yes |
| 44 | PrivateUsers=yes |
| 45 | ProtectControlGroups=yes |
| 46 | ProtectHome=yes |
| 47 | ProtectKernelModules=yes |
| 48 | ProtectKernelTunables=yes |
| 49 | # systemd older than v232 doesn't support a value of "strict" for ProtectSystem, |
| 50 | # so it will ignore that line and use ProtectSystem=full; with newer systemd, |
| 51 | # the latter assignment is recognized and takes precedence, resulting in an |
| 52 | # effective setting of ProtectSystem=strict |
| 53 | ProtectSystem=full |
| 54 | ProtectSystem=strict |
| 55 | RestrictAddressFamilies=AF_UNIX |
| 56 | RestrictNamespaces=yes |
| 57 | RestrictRealtime=yes |
| 58 | StateDirectory=ndn/ndnping |
| 59 | SystemCallArchitectures=native |
| 60 | SystemCallErrorNumber=EPERM |
| 61 | SystemCallFilter=~@aio @chown @clock @cpu-emulation @debug @keyring @module @mount @obsolete @privileged @raw-io @reboot @resources @setuid @swap |
| 62 | |
| 63 | [Install] |
| 64 | WantedBy=multi-user.target |
| 65 | WantedBy=nfd.service |