USE_PROCD=1
-IPT=/usr/sbin/iptables
-WD_DIR=/usr/bin
-
# Run in PROCD (-f) and log to SYSLOG (-s)
OPTIONS="-f -s"
#
for rule in authenticated-users preauthenticated-users users-to-router trusted-users trusted-users-to-router; do
# uci does not allow dashes
- uci_name=${rule//-/_}
+ uci_name=$(echo "$rule" | tr - _)
addline "FirewallRuleSet $rule {"
config_list_foreach "$cfg" "$uci_name" append_firewall
addline "}"
for option in fasport fasremoteip faspath fas_secure_enabled ; do
config_get val "$cfg" "$option"
if [ -n "$val" ]; then
- echo "Warning: nodogsplash does not support $option"
+ echo "Warning: nodogsplash does not support $option" >&2
return 1
fi
done
#!/bin/sh
# Check if nodogsplash is running
-if ndsctl status &> /dev/null; then
+if ndsctl status >/dev/null 2>&1; then
if [ "$(uci -q get nodogsplash.@nodogsplash[0].fwhook_enabled)" = "1" ]; then
/etc/init.d/nodogsplash restart
fi