Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- URL="www.noexisteestadsadsadasd.com"
- antes="UP"
- if curl -s --head $URL | grep "200 OK" > /dev/null
- then
- http="UP"
- else
- http="DOWN"
- fi
- if [ "$http" != "$antes" ]
- then
- echo "server changed state"
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement