Skip to content

Instantly share code, notes, and snippets.

@masbog
Created August 6, 2014 16:45
Show Gist options
  • Save masbog/4a63e501be5a393778e0 to your computer and use it in GitHub Desktop.
Save masbog/4a63e501be5a393778e0 to your computer and use it in GitHub Desktop.
autoreconnect-pptp
#!/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