nfd: Updating upstart scripts
diff --git a/nfd/debian/changelog b/nfd/debian/changelog
index 60b71ac..2e932b4 100644
--- a/nfd/debian/changelog
+++ b/nfd/debian/changelog
@@ -1,3 +1,10 @@
+nfd (0.1.0-ppa1~DISTRO) DISTRO; urgency=low
+
+ * New version based on NFD-0.1.0 (https://github.com/named-
+ data/NFD.git)
+
+ -- Alexander Afanasyev <alexander.afanasyev@ucla.edu> Fri, 09 May 2014 10:39:29 -0700
+
nfd (0.1.0-ppa0.1~DISTRO) DISTRO; urgency=low
* New version based on NFD-0.1.0 (https://github.com/named-
diff --git a/nfd/debian/nfd.nfd-restart.upstart b/nfd/debian/nfd.nfd-restart.upstart
new file mode 100644
index 0000000..213d39c
--- /dev/null
+++ b/nfd/debian/nfd.nfd-restart.upstart
@@ -0,0 +1,12 @@
+# nfd-restart.conf
+#
+# Restarting NDN Forwarding Daemon on network connectivity changes
+
+start on net-device-up
+task
+instance $IFACE
+
+script
+ status nfd | grep -q start/ || stop
+ restart nfd
+end script
diff --git a/nfd/debian/nfd.upstart b/nfd/debian/nfd.upstart
index c9f077f..a0ccb96 100644
--- a/nfd/debian/nfd.upstart
+++ b/nfd/debian/nfd.upstart
@@ -5,11 +5,8 @@
description "NDN forwarding daemon"
author "Alexander Afanasyev <alexander.afanasyev@ucla.edu>"
-# start on filesystem or runlevel [2345]
-# stop on runlevel [!2345]
-
-start on started network-services
-stop on stopping network-services
+start on (local-filesystems and net-device-up IFACE!=lo)
+stop on runlevel [!2345]
respawn
respawn limit unlimited
diff --git a/nfd/debian/rules b/nfd/debian/rules
index 7625da5..58579fb 100755
--- a/nfd/debian/rules
+++ b/nfd/debian/rules
@@ -38,3 +38,4 @@
override_dh_installinit:
dh_installinit
dh_installinit --name=nrd
+ dh_installinit --name=nfd-restart