Skip to content

Instantly share code, notes, and snippets.

@andboson
Last active March 20, 2020 12:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andboson/75bb67ae0f2feb3debcb0b4e7f903cce to your computer and use it in GitHub Desktop.
Save andboson/75bb67ae0f2feb3debcb0b4e7f903cce to your computer and use it in GitHub Desktop.
check is any pptp-vpn running
#!/bin/bash
# sudo apt install libnotify-bin
vpn=`ifconfig | grep POINTOPOINT`
if [ -z "$vpn" ]
then
notify-send -t 0 "VPN is down";
fi
w=`ps aux |grep "watch -n 60" |grep -v "grep"`
echo "$w"
if [ -z "$w" ]
then
echo "start watching"
watch -n 60 ./checkvpn.sh
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment