Advertisement
Guest User

Untitled

a guest
May 11th, 2016
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.24 KB | None | 0 0
  1. #!/bin/sh
  2. CURL=`which curl`
  3. TIMEOUT=2
  4. resp=`$CURL -m $TIMEOUT -I $1 2> /tmp/curl.log| grep HTTP/1.1 | awk {'print $2'}`
  5.  
  6. if [ -z $resp ]; then
  7.     resp=1
  8. fi
  9.  
  10. if [ ${resp} -ne 200 ]; then
  11.     echo "Erro $resp em $1"
  12.     exit 1
  13. fi
  14. exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement