vpnc auto-connect
For some reason my vpn client (vpnc) in ubuntu keeps getting disconnected. The worst is that I had to connect a couple of times before it would connect. So I wrote this tiny bash script to let it dial until it connects :)
#!/bin/bash
while true ;do
sleep 5
pid=/var/run/vpnc/pid
PID="$(cat "$pid" 2> /dev/null)"
if [ -z "$PID" ]; then
/usr/sbin/vpnc-connect /etc/vpnc/netapp.conf
else
echo connected
break
fi
done
#!/bin/bash
while true ;do
sleep 5
pid=/var/run/vpnc/pid
PID="$(cat "$pid" 2> /dev/null)"
if [ -z "$PID" ]; then
/usr/sbin/vpnc-connect /etc/vpnc/netapp.conf
else
echo connected
break
fi
done
5 Comments:
wow great yaar
By built to suit lease, At 1:41 PM
Babar Bhai,
Nice to see you blogging again :)
By Dr.Saleem Khan Marwat, At 11:12 PM
Thank you doc. How is your health now? I do visit your blog every now and then :)
By Babar Haq, At 4:44 PM
Hi,
Thanks by Script, one question:
Where save this script???
file etc?
By opcionweb.cl, At 7:05 PM
I can see that you are an expert at your field! I am launching a website soon, and your information will be very useful for me.. Thanks for all your help and wishing you all the success in your business. Auto Accident Lawyer
By SEO Expert, At 3:07 PM
Post a Comment
Subscribe to Post Comments [Atom]
<< Home