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