Merge pull request #395 from mwarning/nodogsplash2
[feed/routing.git] / nodogsplash2 / files / usr / lib / nodogsplash / restart.sh
diff --git a/nodogsplash2/files/usr/lib/nodogsplash/restart.sh b/nodogsplash2/files/usr/lib/nodogsplash/restart.sh
new file mode 100755 (executable)
index 0000000..e67f11d
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+# Check if nodogsplash is running
+if ndsctl status &> /dev/null; then
+  if [ "$(uci -q get nodogsplash.@nodogsplash[0].fwhook_enabled)" = "1" ]; then
+    /etc/init.d/nodogsplash restart
+  fi
+fi