bmx7-dnsupdate: wait 10 secs if bmx7 ins't running
authorPaul Spooren <redacted>
Sat, 21 Apr 2018 12:20:54 +0000 (21:20 +0900)
committerPaul Spooren <redacted>
Sat, 21 Apr 2018 12:24:06 +0000 (21:24 +0900)
If bmx7 isn't running just yet the folder
`/var/run/bmx7/json/originators` is missing and so the while loop runs
non stop. Now the loop sleeps for 10 seconds if inotifywait fails.

Signed-off-by: Paul Spooren <redacted>
utils/bmx7-dnsupdate/Makefile
utils/bmx7-dnsupdate/files/usr/bin/bmx7-dnsupdate

index c9c024ba0f7f337616af4ced3a12793f8f97b99e..1573d257d44b504917c5fbb71451a61bdb83d0ed 100644 (file)
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=bmx7-dnsupdate
 PKG_VERSION:=0.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 include $(INCLUDE_DIR)/package.mk
 
index 3433fe74206cbfed5db0f3139cb12c5e5177fe1c..2f87437a24c571e15779819a234bd6d48cbce9cb 100755 (executable)
@@ -25,5 +25,5 @@ while true; do
     killall -HUP dnsmasq
 
     # block until originators changes
-    inotifywait -e create -e delete -q /var/run/bmx7/json/originators/
+    inotifywait -e create -e delete -q /var/run/bmx7/json/originators/ || sleep 10
 done
git clone https://git.99rst.org/PROJECT