Skip to content

Instantly share code, notes, and snippets.

@arodland
Created September 30, 2009 04:15
Show Gist options
  • Select an option

  • Save arodland/197772 to your computer and use it in GitHub Desktop.

Select an option

Save arodland/197772 to your computer and use it in GitHub Desktop.
#!/bin/sh
while true; do
if ! /bin/pidof vpnc >/dev/null 2>&1 || ! ping -c 2 -w 10 192.168.10.249 >/dev/null 2>&1 ; then
if /usr/bin/killall vpnc >/dev/null 2>&1 ; then
while /bin/pidof vpnc >/dev/null 2>&1 ; do
/bin/sleep 5
done
fi
/usr/sbin/vpnc --non-inter
fi
/bin/sleep 60
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment