From cd72719bfa11324dc52970e7f712a8d8c884200f Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Tue, 30 Mar 2021 15:30:36 +0200 Subject: [PATCH] Add -w to iptables --- omr-tracker/files/bin/omr-tracker-v2ray | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/omr-tracker/files/bin/omr-tracker-v2ray b/omr-tracker/files/bin/omr-tracker-v2ray index e8e0dcffe..2530ca63f 100755 --- a/omr-tracker/files/bin/omr-tracker-v2ray +++ b/omr-tracker/files/bin/omr-tracker-v2ray @@ -75,7 +75,7 @@ while true; do uci -q set openmptcprouter.omr.v2ray="up" uci -q commit openmptcprouter.omr } - if [ -z "$(iptables -t nat -L -n | grep v2r)" ]; then + if [ -z "$(iptables -w -t nat -L -n | grep v2r)" ]; then _log "Reload V2Ray rules" /etc/init.d/v2ray rules_up 2> /dev/null _get_ip @@ -86,7 +86,7 @@ while true; do last=$((last + 1 )) [ -z "$nocontact" ] && nocontact="$host" || nocontact="$nocontact, $host" [ "${last}" -ge "${retry}" ] && { - if [ -n "$(iptables -t nat -L -n | grep v2r)" ]; then + if [ -n "$(iptables -w -t nat -L -n | grep v2r)" ]; then _log "V2Ray is down (can't contact via http ${nocontact})" uci -q set openmptcprouter.omr.v2ray="down" uci -q commit openmptcprouter.omr