Bash script that checks site status

Job ID: 34868168

Budget: £30 – £75 GBP

I want bash script, that will use curl to check the status code of a site.
If the status code is 200 or 302 it will do nothing
If the status code is something else it will write in a file Check Failed
The script will run every 5 mins using crontab -e
If there is more then 12 lines of Check Failed
it will run comman service apache2 stop
service nginx stop
and then start for both
Clear the log file and enter the words service restarted
and then it all repeats
Related categories: PHP JavaScript Linux Software Architecture Shell Script