Ajout monitor

This commit is contained in:
Jonas TURBEAUX 2017-08-23 16:47:10 +00:00
parent c4a0f34492
commit 5d69d353db
1 changed files with 9 additions and 0 deletions

9
monitor/HTTP_STATUS.sh Normal file
View File

@ -0,0 +1,9 @@
#!/bin/bash
HTTP_STATUS=$(curl -s -o /dev/null -I -w "%{http_code}" https://adenium.gdna.re)
echo $HTTP_STATUS
if [ "$HTTP_STATUS" == "200" ]
then
echo 'RESULT=True,ERROR=,SCREEN=,DATE='$(date +%s)
else
echo 'RESULT=False,ERROR=,SCREEN=,DATE='$(date +%s)
fi