Files
ruantiblock_openwrt/ruantiblock/files/etc/hotplug.d/iface/40-ruantiblock
T
2023-10-17 01:20:06 +03:00

12 lines
295 B
Bash
Executable File

#!/bin/sh
IF_VPN=`uci get ruantiblock.config.if_vpn`
PROXY_MODE=`uci get ruantiblock.config.proxy_mode`
if [ "$ACTION" = "ifup" ] && [ "$PROXY_MODE" = "2" ] && [ "$DEVICE" = "$IF_VPN" ]; then
if [ `/usr/bin/ruantiblock raw-status` -ne 2 ]; then
sleep 5
/usr/bin/ruantiblock reload
fi
fi