lihao
unread,Jun 1, 2012, 11:06:01 AM6/1/12You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
I have one bash script under RHEL 5.3 to reconnect the VPN whenever
it's broken i.e.
############
if ! ps -C 'vpnclient' --no-heading >/dev/null 2>&1
then
echo "relink at $(date +%F\ %T)"
nohup /path/to/vpnclient connect ******* >/dev/null &
fi
#############
sometimes the ps command displays vpnclient OK but the connection is
stale, there is no actual connection until I run pkill vpnclient and
reconnect the VNP.
is there any way that I can detect if a connection is stale for a
certain time i.e. 120 seconds, and then run the pkill command in order
to re-establish the connection?
many thanks,
lihao