Created
June 27, 2018 09:23
-
-
Save electric380v/e75e68950a46536c7c169a15013d28ad to your computer and use it in GitHub Desktop.
Сheck Geteway
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 | |
## Сheck Geteway | |
if ping -c 2 8.8.8.8 >/dev/null | |
then | |
date | |
echo "online" | |
else | |
echo "Offline" | |
systemctl restart openvpn@01 | |
fi | |
if ping -c 2 8.8.4.4 >/dev/null | |
then | |
echo "Online" | |
else | |
echo "Offline" | |
systemctl restart openvpn@02 | |
fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment