Skip to content

Commit

Permalink
Use HTTP request instead of ping
Browse files Browse the repository at this point in the history
  • Loading branch information
joepool committed Sep 16, 2020
1 parent d681bd0 commit d99783e
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 @@ -5,7 +5,7 @@ do
now=$(date)
case "$(curl -s --max-time 2 -I http://google.com | sed 's/^[^ ]* *\([0-9]\).*/\1/; 1q')" in
[23]):;;
*) echo "The network is down or very slow";output="${now} - Network is Down";echo "$output" >> "$dir";;
*) echo "Network is Down";output="${now} - Network is Down";echo "$output" >> "$dir";;
esac
sleep 30
done

0 comments on commit d99783e

Please sign in to comment.