Created
October 11, 2016 03:46
-
-
Save likai24/508da69413ecc7200929d5fa6fdad901 to your computer and use it in GitHub Desktop.
vpn_check.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
id=$(ps axw | grep "[ /]pppd call $1" | awk '{print $1}') | |
if [[ -z $id ]]; | |
then | |
echo 'no connection' >> /var/log/pptp/retry | |
sudo pon yourdomainname | |
else | |
echo 'yes' | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment