Last active
January 27, 2016 15:40
-
-
Save Dirrk/51cb143625ab6914c962 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
FILE=output.html | |
while [ 0 -eq 0 ]; do | |
echo "<style>body {background-color: #000000; color: #ffffff; text-align: center; font-family: Courier, Helvetica, sans-serif; color: #f4f5f7; font-size: 16px; text-transform: uppercase;} p { padding: 0; margin: 2px; }</style><h1>Server - Status</h1>" > $FILE | |
for num in {11..27}; do | |
curl -s --max-time 5 "http://nodejs${num}.dc3.homes.com/v1/ad/reporting/overall?api_key=00000000000000000000000000000&date_start=2015-12-01" >/dev/null 2>&1 | |
status=$? | |
if [ $status -eq 0 ]; then | |
echo "<p>nodejs${num} - <span style='color: green'>success</span></p>" >> $FILE | |
else | |
echo "<p><strong>nodejs${num} - <span style='color: red; font-size: 18px'>failed</span></strong></p>" >> $FILE | |
fi | |
done | |
now=`date` | |
echo "<p style='margin-top: 10px; border-top: 1px solid grey; padding-top: 10px'>${now}</p>" >> $FILE | |
sleep 60 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment