Alexander Afanasyev | 469cbcd | 2014-05-08 01:25:11 -0700 | [diff] [blame] | 1 | # nfd.conf |
| 2 | # |
| 3 | # NDN Forwarding Daemon |
| 4 | |
| 5 | description "NDN forwarding daemon" |
| 6 | author "Alexander Afanasyev <alexander.afanasyev@ucla.edu>" |
| 7 | |
Alexander Afanasyev | bcbf15e | 2014-05-09 10:23:37 -0700 | [diff] [blame] | 8 | start on (local-filesystems and net-device-up IFACE!=lo) |
| 9 | stop on runlevel [!2345] |
Alexander Afanasyev | 469cbcd | 2014-05-08 01:25:11 -0700 | [diff] [blame] | 10 | |
| 11 | respawn |
| 12 | respawn limit unlimited |
| 13 | |
| 14 | env HOME=/var/lib/ndn/nfd |
| 15 | export HOME |
| 16 | |
| 17 | exec /usr/bin/nfd --config /etc/ndn/nfd.conf 2>> /var/log/ndn/nfd.log |
Alexander Afanasyev | 147f859 | 2014-07-30 12:48:29 -0700 | [diff] [blame] | 18 | |
| 19 | post-start script |
| 20 | if [ -f /etc/ndn/nfd-init.sh ]; then |
| 21 | sleep 2 # post-start is executed just after nfd process starts, but there is no guarantee |
| 22 | # that all initialization has been finished |
| 23 | . /etc/ndn/nfd-init.sh |
| 24 | fi |
| 25 | end script |
| 26 | |
Alexander Afanasyev | 469cbcd | 2014-05-08 01:25:11 -0700 | [diff] [blame] | 27 | post-stop exec sleep 2 |
Alexander Afanasyev | 147f859 | 2014-07-30 12:48:29 -0700 | [diff] [blame] | 28 | |
Alexander Afanasyev | 22952e6 | 2014-08-01 14:34:54 -0700 | [diff] [blame] | 29 | # The following option is useful, but not supported on Ubuntu 12.04 |
| 30 | # reload signal SIGHUP |