nodogsplash: add startup checks and restart hook

This commit is contained in:
Rob White 2018-05-02 18:52:58 +01:00 committed by GitHub
parent 68fe8af895
commit 6245e364fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -267,9 +267,9 @@ start_service() {
if [ $(uci get nodogsplash.@nodogsplash[0].fwhook_enabled) = "1" ] ; then if [ $(uci get nodogsplash.@nodogsplash[0].fwhook_enabled) = "1" ] ; then
if ! uci get firewall.nodogsplash2.path &> /dev/null ; then if ! uci get firewall.nodogsplash2.path &> /dev/null ; then
if [ -f '/tmp/etc/ndshook.include' ] ; then if [ -f '/tmp/etc/ndshook.include' ] ; then
rm /tmp/etc/ndshook.include rm /tmp/etc/ndshook.include
fi fi
uci delete firewall.nodogsplash2 2> /dev/null uci delete firewall.nodogsplash2 2> /dev/null
uci set firewall.nodogsplash2=include uci set firewall.nodogsplash2=include
uci set firewall.nodogsplash2.type=script uci set firewall.nodogsplash2.type=script