Score:0

Print Notification to Text File if Website Back to UP using CURL or Bash

in flag

I'am sorry, i new in programming. I will a simple script. Current Condition, i already create script if status website 200 or 301, Website is UP. If status not 200/301 , website down. Now i success with my script. Now, i will create if website status besides 200/301 and back to 200/301, then print to text file status from down back to UP.

Anyone knows this script?

#!/bin/bash

if curl -I "https://statusscloud.google.com" 2>&1 | grep -w "200|301" ; then echo "statusscloud.google.com is up" >> /home/rizkiabdillah/statuscloud.log else echo "statusscloud.google.com is ERROR" >> /home/rizkiabdillah/statuscloud.log fi

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.