Martineau
Part of the Furniture
If you specify the VPN Client instance, then the 'reset' request should only apply to the target VPN client rather than ALL of them.Yes and No ,
the answer is clear but it doesn´t solve my problem, because every instance of the VPNFailoverscript would be killed by the command.
I was hoping, it would be possible to have a specific command for each instance of the vpnfailoverscript, which can be used in a openvpnX-down event.
e.g. I use the VPNfailoverscript e.g. for VPN1 to force to reconnect if the speed drops down - works. But what happens if I decide to manually turn off the vpn1 connection? In that case the vpnfailoverscript would reestablish the connection wouldn´t it ? So a manual turn off is not possible - right??
As shown here, the VPN trigger-event pair should cleanly terminate its monitoring.
(VPN_Failover.sh will gracefully self-terminate if its semaphore control file does not exist - i.e. the 'reset' command simply deletes the file)
vpnclientX-up
Code:
VPN_ID=${dev:4:1}
Say "Requesting VPN Failover monitor with 2 min delay....."
/jffs/scripts/VPN_Failover.sh "$VPN_ID" "delay=120" "ignore=2,3,4,5" "verbose" "interval=1200" &
vpnclientX-route-pre-down
Code:
VPN_ID=${dev:4:1}
MOUNT="/tmp"
VPNFAILOVER="/tmp/vpnclient"$VPN_ID"-VPNFailover"
# Also rely on the VPN_Failover.sh to test for the existence of the VPNFailover semaphore BEFORE it attempts a restart!
if [ -z "$(grep "NOKILL" $VPNFAILOVER)" ];then
PID=$(cat $VPNFAILOVER)
[ "$PID" != "NOKILL" ] && kill $PID
rm $VPNFAILOVER
logger -st "($(basename $0))" $$ "VPN Failover Monitor self-destruct requested....." $VPNFAILOVER "RC="$?
fi
By the way : Did you find an explanation or a solution for the error I described earlier (#67) ?
Perhaps try v1.24 hosted on my Github 'dev' branch
Last edited: