summaryrefslogtreecommitdiff
path: root/sentinel-minipot/files/uci-defaults
diff options
context:
space:
mode:
Diffstat (limited to 'sentinel-minipot/files/uci-defaults')
-rw-r--r--sentinel-minipot/files/uci-defaults25
1 files changed, 25 insertions, 0 deletions
diff --git a/sentinel-minipot/files/uci-defaults b/sentinel-minipot/files/uci-defaults
new file mode 100644
index 0000000..f90516c
--- /dev/null
+++ b/sentinel-minipot/files/uci-defaults
@@ -0,0 +1,25 @@
+#!/bin/sh
+set -e
+. /lib/functions/sentinel-firewall.sh
+
+# Minipot entry in sentinel config
+if [ "$(uci -q get sentinel.minipot)" != "minipot" ]; then
+ uci -q batch <<EOT
+ delete sentinel.minipot
+ set sentinel.minipot='minipot'
+ commit sentinel.minipot
+EOT
+fi
+
+# Remove old firewall rules
+[ -z "$(uci -q get firewall.sentinel_minipot_telnet_mark)" ] || \
+ uci -q delete firewall.sentinel_minipot_telnet_mark
+[ -z "$(uci -q get firewall.sentinel_minipot_telnet)" ] || \
+ uci -q delete firewall.sentinel_minipot_telnet
+
+
+# Enable for wan interface in default
+config_firewall_default_enable "sentinel_minipot"
+
+# Always reload firewall to use latest version of sentinel-firewall script
+/etc/init.d/firewall reload