mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Remove not needed iptables-save output
This commit is contained in:
parent
25cdf439ca
commit
ca45d952c2
11 changed files with 40 additions and 39 deletions
|
@ -326,7 +326,7 @@ reload_service() {
|
|||
}
|
||||
|
||||
rules_exist() {
|
||||
[ -n "$(iptables-save | grep 'A ssr')" ] && return 0
|
||||
[ -n "$(iptables-save 2>/dev/null | grep 'A ssr')" ] && return 0
|
||||
return 1
|
||||
}
|
||||
|
||||
|
@ -356,7 +356,7 @@ rules_up() {
|
|||
config_foreach ss_rules_restart "$cfgtype" "$cfgtype"
|
||||
done
|
||||
config_foreach ss_rules ss_rules
|
||||
[ -z "$(iptables-save | grep :ssr)" ] && logger -t "Shadowsocks" "Rules not applied"
|
||||
[ -z "$(iptables-save 2>/dev/null | grep :ssr)" ] && logger -t "Shadowsocks" "Rules not applied"
|
||||
[ -f /etc/init.d/omr-bypass ] && [ -z "$(pgrep -f omr-bypass)" ] && {
|
||||
logger -t "Shadowsocks" "Reload omr-bypass rules"
|
||||
/etc/init.d/omr-bypass reload_rules
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue