Davide Pesavento | 4253885 | 2017-11-12 23:58:30 -0500 | [diff] [blame] | 1 | # Copyright (c) 2015-2017, 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. |
Eric Newberry | 187ade8 | 2015-05-13 01:22:51 -0700 | [diff] [blame] | 8 | # |
| 9 | # This file is part of NFD (Named Data Networking Forwarding Daemon). |
| 10 | # See AUTHORS.md for complete list of NFD authors and contributors. |
| 11 | # |
| 12 | # NFD 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 | # NFD 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 | # NFD, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>. |
| 22 | # |
| 23 | # Author: Eric Newberry <enewberry@email.arizona.edu> |
Davide Pesavento | 4253885 | 2017-11-12 23:58:30 -0500 | [diff] [blame] | 24 | # Author: Davide Pesavento <davide.pesavento@lip6.fr> |
Eric Newberry | 187ade8 | 2015-05-13 01:22:51 -0700 | [diff] [blame] | 25 | |
| 26 | [Unit] |
| 27 | Description=NDN Forwarding Daemon |
Davide Pesavento | 4253885 | 2017-11-12 23:58:30 -0500 | [diff] [blame] | 28 | Documentation=man:nfd(1) man:nfdc(1) |
Eric Newberry | 187ade8 | 2015-05-13 01:22:51 -0700 | [diff] [blame] | 29 | Wants=network-online.target |
| 30 | After=network-online.target |
| 31 | |
| 32 | [Service] |
| 33 | Environment=HOME=/usr/local/var/lib/ndn/nfd |
| 34 | ExecStart=/usr/local/bin/nfd --config /usr/local/etc/ndn/nfd.conf |
| 35 | ExecStartPost=/bin/sh -ec 'sleep 2; if [ -f /usr/local/etc/ndn/nfd-init.sh ]; then . /usr/local/etc/ndn/nfd-init.sh; fi' |
Davide Pesavento | 4253885 | 2017-11-12 23:58:30 -0500 | [diff] [blame] | 36 | ExecReload=/bin/kill -HUP $MAINPID |
Eric Newberry | 187ade8 | 2015-05-13 01:22:51 -0700 | [diff] [blame] | 37 | Restart=on-failure |
Davide Pesavento | 4253885 | 2017-11-12 23:58:30 -0500 | [diff] [blame] | 38 | RestartPreventExitStatus=2 4 |
Eric Newberry | 187ade8 | 2015-05-13 01:22:51 -0700 | [diff] [blame] | 39 | PrivateTmp=yes |
| 40 | PrivateDevices=yes |
Davide Pesavento | 4253885 | 2017-11-12 23:58:30 -0500 | [diff] [blame] | 41 | ProtectSystem=full |
Eric Newberry | 187ade8 | 2015-05-13 01:22:51 -0700 | [diff] [blame] | 42 | ProtectHome=yes |
Davide Pesavento | 4253885 | 2017-11-12 23:58:30 -0500 | [diff] [blame] | 43 | ProtectKernelTunables=yes |
| 44 | ProtectKernelModules=yes |
| 45 | ProtectControlGroups=yes |
| 46 | SystemCallFilter=~@clock @cpu-emulation @debug @keyring @module @mount @obsolete @raw-io @reboot @swap |
| 47 | SystemCallArchitectures=native |
| 48 | MemoryDenyWriteExecute=yes |
| 49 | RestrictRealtime=yes |
Eric Newberry | 187ade8 | 2015-05-13 01:22:51 -0700 | [diff] [blame] | 50 | |
| 51 | [Install] |
| 52 | WantedBy=multi-user.target |