Advertisement
Guest User

Untitled

a guest
Jul 16th, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. #!/bin/bash
  2. HTTPD=`curl -A "Web Check" -sL --connect-timeout 3 -w "%{http_code}n" "http://127.0.0.1" -o /dev/null`
  3. until [ "$HTTPD" == "200" ]; do
  4. printf '.'
  5. sleep 5
  6. service nginx restart
  7. done
  8.  
  9. or
  10.  
  11. while [ "$HTTPD" != "200" ];
  12. do
  13. service nginx restart
  14. sleep 5
  15. if [ "$HTTPD" == "200" ];then
  16. break;
  17. else
  18. service nginx restart
  19. fi
  20. done
  21.  
  22. #!/bin/bash
  23.  
  24. HTTPD=`curl -A "Web Check" -sL --connect-timeout 3 -w "%{http_code}n" "http://127.0.0.1" -o /dev/null`
  25. until [ "$HTTPD" == "200" ]; do
  26. printf '.'
  27. sleep 3
  28. service nginx restart
  29. HTTPD=`curl -A "Web Check" -sL --connect-timeout 3 -w "%{http_code}n" "http://127.0.0.1" -o /dev/null`
  30. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement