Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- HTTPD=`curl -A "Web Check" -sL --connect-timeout 3 -w "%{http_code}n" "http://127.0.0.1" -o /dev/null`
- until [ "$HTTPD" == "200" ]; do
- printf '.'
- sleep 5
- service nginx restart
- done
- or
- while [ "$HTTPD" != "200" ];
- do
- service nginx restart
- sleep 5
- if [ "$HTTPD" == "200" ];then
- break;
- else
- service nginx restart
- fi
- done
- #!/bin/bash
- HTTPD=`curl -A "Web Check" -sL --connect-timeout 3 -w "%{http_code}n" "http://127.0.0.1" -o /dev/null`
- until [ "$HTTPD" == "200" ]; do
- printf '.'
- sleep 3
- service nginx restart
- HTTPD=`curl -A "Web Check" -sL --connect-timeout 3 -w "%{http_code}n" "http://127.0.0.1" -o /dev/null`
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement