Alexander Afanasyev | 37a05f6 | 2014-05-09 18:55:21 -0700 | [diff] [blame] | 1 | # nfd.conf |
| 2 | # |
| 3 | # NDN Forwarding Daemon |
| 4 | |
| 5 | description "NDN forwarding daemon" |
| 6 | |
| 7 | start on (local-filesystems and net-device-up IFACE!=lo) |
| 8 | stop on runlevel [!2345] |
| 9 | |
| 10 | respawn |
| 11 | respawn limit unlimited |
| 12 | |
| 13 | env HOME=/usr/local/var/lib/ndn/nfd |
| 14 | export HOME |
| 15 | |
| 16 | exec /usr/local/bin/nfd --config /usr/local/etc/ndn/nfd.conf 2>> /usr/local/var/log/ndn/nfd.log |
Alexander Afanasyev | f08a737 | 2015-02-09 21:28:19 -0800 | [diff] [blame] | 17 | |
| 18 | post-start script |
| 19 | if [ -f /usr/local/etc/ndn/nfd-init.sh ]; then |
| 20 | sleep 2 # post-start is executed just after nfd process starts, but there is no guarantee |
| 21 | # that all initialization has been finished |
| 22 | . /usr/local/etc/ndn/nfd-init.sh |
| 23 | fi |
| 24 | end script |
| 25 | |
Alexander Afanasyev | 37a05f6 | 2014-05-09 18:55:21 -0700 | [diff] [blame] | 26 | post-stop exec sleep 2 |