Alexander Afanasyev | a2e423f | 2014-08-19 15:26:15 -0500 | [diff] [blame] | 1 | description "NDN Autoconfig Server" |
| 2 | author "Alexander Afanasyev <alexander.afanasyev@ucla.edu>" |
| 3 | |
Alexander Afanasyev | 2ed9586 | 2015-07-23 11:11:53 +0800 | [diff] [blame] | 4 | start on started nfd |
| 5 | stop on stopping nfd |
Alexander Afanasyev | a2e423f | 2014-08-19 15:26:15 -0500 | [diff] [blame] | 6 | |
| 7 | respawn |
| 8 | respawn limit unlimited |
| 9 | |
| 10 | setuid ndn |
| 11 | setgid ndn |
| 12 | |
| 13 | script |
| 14 | FACE_URI="" |
Alexander Afanasyev | 7688d0e | 2014-09-05 09:52:45 -0700 | [diff] [blame] | 15 | ROUTABLE_PREFIXES="" |
Alexander Afanasyev | 3120655 | 2014-12-18 22:33:28 -0800 | [diff] [blame] | 16 | ENABLE_DAEMON=false |
Alexander Afanasyev | a2e423f | 2014-08-19 15:26:15 -0500 | [diff] [blame] | 17 | if [ -f /etc/default/ndn-autoconfig-server ]; then |
| 18 | . /etc/default/ndn-autoconfig-server |
| 19 | fi |
| 20 | |
Alexander Afanasyev | f4c49e6 | 2014-08-20 11:54:20 -0700 | [diff] [blame] | 21 | if [ "$FACE_URI" != "" ]; then |
Alexander Afanasyev | a2e423f | 2014-08-19 15:26:15 -0500 | [diff] [blame] | 22 | export HOME=/var/lib/ndn/ndn-autoconfig-server |
Alexander Afanasyev | 7688d0e | 2014-09-05 09:52:45 -0700 | [diff] [blame] | 23 | exec /usr/bin/ndn-autoconfig-server $ROUTABLE_PREFIXES $FACE_URI |
Alexander Afanasyev | a2e423f | 2014-08-19 15:26:15 -0500 | [diff] [blame] | 24 | fi |
| 25 | end script |