mirror of
https://github.com/gSpotx2f/ruantiblock_openwrt.git
synced 2026-05-14 06:30:59 +00:00
Minor improvements. luci-app-ruantiblock: updated log.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user