Last active
December 12, 2015 04:28
-
-
Save ferminhg/4714058 to your computer and use it in GitHub Desktop.
SSH: Detectar si una web esta o no caida
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/sh | |
ping -c 1 server.com >/dev/null 2>&1 | |
if [ "$?" != 0 ] | |
then | |
echo "down :_(" | |
date | |
else | |
echo "up :-)" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment