Minor improvements. luci-app-ruantiblock: updated log.

This commit is contained in:
gSpot
2025-04-14 19:05:04 +03:00
parent 82fd11b612
commit ba8011c8ba
20 changed files with 425 additions and 248 deletions
@@ -12,10 +12,10 @@ if [ "$ACTION" = "ifup" ]; then
DEBUG=0
IF_VPN_CURRENT=""
ruab_route_status=`$RUAB_CMD raw-status`
ruab_route_status=$($RUAB_CMD raw-status)
[ $ruab_route_status -eq 1 -o $ruab_route_status -eq 2 ] && exit 0
UCI_CMD=`which uci`
UCI_CMD="$(which uci)"
if [ $? -ne 0 ]; then
echo " Error! UCI doesn't exists" >&2
exit 1
@@ -23,19 +23,19 @@ if [ "$ACTION" = "ifup" ]; then
[ -f "$CONFIG_FILE" ] && . "$CONFIG_FILE"
VPN_ROUTE_CHECK=`$UCI_CMD get ruantiblock.config.vpn_route_check`
VPN_ROUTE_CHECK=$($UCI_CMD get ruantiblock.config.vpn_route_check)
[ "$VPN_ROUTE_CHECK" != "0" ] && exit 0
PROXY_MODE=`$UCI_CMD get ruantiblock.config.proxy_mode`
PROXY_MODE=$($UCI_CMD get ruantiblock.config.proxy_mode)
if [ "$PROXY_MODE" = "2" ]; then
IF_VPN_CURRENT=`$UCI_CMD get ruantiblock.config.if_vpn`
IF_VPN_CURRENT=$($UCI_CMD get ruantiblock.config.if_vpn)
fi
if [ "$DEVICE" != "$IF_VPN_CURRENT" ]; then
. "$USER_INSTANCES_COMMON"
for inst in `GetUserInstances 2`
for inst in $(GetUserInstances 2)
do
IncludeUserInstanceVars "$inst"
if [ "$DEVICE" = "$U_IF_VPN" ]; then