diff --git a/headers b/headers new file mode 100644 index 0000000..51b6d00 --- /dev/null +++ b/headers @@ -0,0 +1,10 @@ +HTTP/1.1 200 OK +Server: nginx/1.21.1 +Date: Thu, 29 Jul 2021 16:22:12 GMT +Content-Type: text/html +Content-Length: 17678 +Last-Modified: Thu, 29 Jul 2021 08:52:10 GMT +Connection: keep-alive +ETag: "61026c3a-450e" +Accept-Ranges: bytes + diff --git a/testWeb.sh b/testWeb.sh index 54a9cac..a49ea35 100755 --- a/testWeb.sh +++ b/testWeb.sh @@ -3,7 +3,8 @@ echo "TEST HUGO" url=http://localhost:6060 curl ${url} -I -o headers -s -if((cat headers | head -n 1 | cut '-d ' '-f2')==200) +reponse=$(cat headers | head -n 1 | cut '-d ' '-f2') +if [ $reponse == "200" ] then exit 0 fi