mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Delete old network rules in omr-bypass
This commit is contained in:
parent
53183d60f7
commit
d05eb63a52
1 changed files with 11 additions and 0 deletions
|
@ -825,6 +825,12 @@ _delete_firewall_rules() {
|
|||
}
|
||||
}
|
||||
|
||||
_delete_network_rules() {
|
||||
[ -n "$(echo $1 | grep fw_rule)" ] && {
|
||||
uci -q delete network.$1
|
||||
}
|
||||
}
|
||||
|
||||
boot() {
|
||||
BOOT=1
|
||||
start "$@"
|
||||
|
@ -841,6 +847,9 @@ start_service() {
|
|||
config_foreach _delete_firewall_rules rule
|
||||
config_foreach _delete_firewall_rules ipset
|
||||
#uci -q commit firewall
|
||||
config_load network
|
||||
config_foreach _delete_network_rules rule
|
||||
#uci -q commit network
|
||||
|
||||
|
||||
add_domains="false"
|
||||
|
@ -931,6 +940,8 @@ start_service() {
|
|||
uci -q commit omr-bypass
|
||||
uci -q commit dhcp
|
||||
uci -q commit firewall
|
||||
uci -q commit network
|
||||
/etc/init.d/network reload
|
||||
fw4 -q restart
|
||||
|
||||
[ -z "$RELOAD" ] && [ "$add_domains" = "true" ] && {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue