Skip to content

Commit

Permalink
Increase HTTP timeout to prevent false positives
Browse files Browse the repository at this point in the history
  • Loading branch information
joepool committed Sep 17, 2020
1 parent d99783e commit 4bf0893
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion NetworkStatusLogger.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ dir=("/home/pi/networkstatuslog.txt")
while :
do
now=$(date)
case "$(curl -s --max-time 2 -I http://google.com | sed 's/^[^ ]* *\([0-9]\).*/\1/; 1q')" in
case "$(curl -s --max-time 5 -I http://google.com | sed 's/^[^ ]* *\([0-9]\).*/\1/; 1q')" in
[23]):;;
*) echo "Network is Down";output="${now} - Network is Down";echo "$output" >> "$dir";;
esac
Expand Down

0 comments on commit 4bf0893

Please sign in to comment.