From 9d0a75a7f8bbc73c82a96ddff3cb16c6a1c611eb Mon Sep 17 00:00:00 2001 From: gSpot Date: Wed, 3 Jan 2024 18:49:22 +0300 Subject: [PATCH] Minor fixes --- ruantiblock/files/etc/hotplug.d/iface/40-ruantiblock | 5 ++++- ruantiblock/files/usr/bin/ruantiblock | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ruantiblock/files/etc/hotplug.d/iface/40-ruantiblock b/ruantiblock/files/etc/hotplug.d/iface/40-ruantiblock index 7fe4587..08f1693 100755 --- a/ruantiblock/files/etc/hotplug.d/iface/40-ruantiblock +++ b/ruantiblock/files/etc/hotplug.d/iface/40-ruantiblock @@ -13,5 +13,8 @@ VPN_ROUTE_CHECK=`$UCI_CMD get ruantiblock.config.vpn_route_check` [ "$VPN_ROUTE_CHECK" != "0" ] && exit 0 if [ "$ACTION" = "ifup" ] && [ "$PROXY_MODE" = "2" ] && [ "$DEVICE" = "$IF_VPN" ]; then - [ `$RUAB_CMD raw-status` -ne 2 ] && $RUAB_CMD reload + if [ `$RUAB_CMD raw-status` -ne 2 ]; then + sleep 5 + $RUAB_CMD reload + fi fi diff --git a/ruantiblock/files/usr/bin/ruantiblock b/ruantiblock/files/usr/bin/ruantiblock index fc9bef4..e931986 100755 --- a/ruantiblock/files/usr/bin/ruantiblock +++ b/ruantiblock/files/usr/bin/ruantiblock @@ -379,7 +379,7 @@ UpdateBllistProxySet() { if printf "$host" | $AWK_CMD '{exit ($0 ~ /^([0-9]{1,3}.){3}[0-9]{1,3}$/) ? 0 : 1}'; then _ip_string="${_ip_string}${host} " else - _ip_string="${_ip_string}`$NSLOOKUP_CMD $host | $AWK_CMD '/^Address: ([0-9]{1,3}.){3}[0-9]{1,3}$/ {printf $2" "}'`" + _ip_string="${_ip_string}`$NSLOOKUP_CMD $host 2> /dev/null | $AWK_CMD '/^Address: ([0-9]{1,3}.){3}[0-9]{1,3}$/ {printf $2" "}'`" fi done _ip_string=`FormatNftSetElemsList "$_ip_string"`