ComputerSteve
Senior Member
I would like to know if there’s a way to make wan 2 switch to cold standby instead of hot standby once wan 1s connection is re-established. This used to work in the wan-event:::
wan1flag="False"
wstate0=$(nvram get wan0_state_t)
wstate1=$(nvram get wan1_state_t)
if [ $wstate1 -eq 2 ]; then
wan1flag="True"
fi
if [ $wstate0 -eq 2 ]; then
if [ "$wan1flag" == "True" ]; then
sleep 30
nvram set wan1_ipaddr="0.0.0.0"
nvram set wan1_state_t="3"
service stop_wan
service start_wan
wan1flag="False"
fi
fi
wan1flag="False"
wstate0=$(nvram get wan0_state_t)
wstate1=$(nvram get wan1_state_t)
if [ $wstate1 -eq 2 ]; then
wan1flag="True"
fi
if [ $wstate0 -eq 2 ]; then
if [ "$wan1flag" == "True" ]; then
sleep 30
nvram set wan1_ipaddr="0.0.0.0"
nvram set wan1_state_t="3"
service stop_wan
service start_wan
wan1flag="False"
fi
fi