mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Fix indentation
This commit is contained in:
parent
8ce857cdd6
commit
245d1b43c4
1 changed files with 13 additions and 12 deletions
|
@ -148,18 +148,19 @@ restart_omrtracker() {
|
||||||
}
|
}
|
||||||
|
|
||||||
set_lan_ips() {
|
set_lan_ips() {
|
||||||
config_get ip4table "$1" ip4table
|
config_get ip4table "$1" ip4table
|
||||||
config_get device "$1" device
|
config_get device "$1" device
|
||||||
config_get proto "$1" proto
|
config_get proto "$1" proto
|
||||||
if [ "$ip4table" != "wan" ] && [ "$ip4table" != "vpn" ] && [ -n "$ip4table" ] && [ -n "$device" ] && ([ "$proto" = "dhcp" ] || [ "$proto" = "static" ]); then
|
[ -n "$(echo $device | grep -)" ] && uci -q set openmptcprouter.settings.restrict_to_lan="0" && uci commit openmptcprouter
|
||||||
[ -z "$(uci -q get shadowsocks-libev.ss_rules.ifnames | grep $device)" ] && [ -z "$(uci -q get shadowsocks-rust.ss_rules.ifnames | grep $device)" ] && {
|
if [ "$ip4table" != "wan" ] && [ "$ip4table" != "vpn" ] && [ -n "$ip4table" ] && [ -n "$device" ] && ([ "$proto" = "dhcp" ] || [ "$proto" = "static" ]); then
|
||||||
uci -q add_list shadowsocks-libev.ss_rules.ifnames="$device"
|
[ -z "$(uci -q get shadowsocks-libev.ss_rules.ifnames | grep $device)" ] && [ -z "$(uci -q get shadowsocks-rust.ss_rules.ifnames | grep $device)" ] && {
|
||||||
uci -q add_list shadowsocks-rust.ss_rules.ifnames="$device"
|
uci -q add_list shadowsocks-libev.ss_rules.ifnames="$device"
|
||||||
}
|
uci -q add_list shadowsocks-rust.ss_rules.ifnames="$device"
|
||||||
elif [ -n "$device" ] && [ -n "$(uci -q get shadowsocks-libev.ss_rules.ifnames | grep $device)" ]; then
|
}
|
||||||
uci -q del_list shadowsocks-libev.ss_rules.ifnames="$device"
|
elif [ -n "$device" ] && [ -n "$(uci -q get shadowsocks-libev.ss_rules.ifnames | grep $device)" ]; then
|
||||||
uci -q del_list shadowsocks-rust.ss_rules.ifnames="$device"
|
uci -q del_list shadowsocks-libev.ss_rules.ifnames="$device"
|
||||||
fi
|
uci -q del_list shadowsocks-rust.ss_rules.ifnames="$device"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
config_load network
|
config_load network
|
||||||
config_foreach restart_omrtracker interface
|
config_foreach restart_omrtracker interface
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue