Created
August 6, 2014 16:45
-
-
Save masbog/4a63e501be5a393778e0 to your computer and use it in GitHub Desktop.
autoreconnect-pptp
This file contains 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 | |
#!/bin/sh | |
if ping -qnw1 -c1 your_ip_server_from_ppp0 2>&1 >/dev/null | |
then | |
echo "Link is up" | |
else | |
echo "Link is down, trying to reconnecting..." | |
pppd call pptp_config_name | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment