Created
August 7, 2015 13:57
-
-
Save danielfilho/f08281eb0265f85d2634 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 | |
# AnyBar - https://github.com/tonsky/AnyBar | |
function anybar { echo -n $1 | nc -4u -w0 localhost ${2:-1738}; } | |
function drip { | |
while sleep 5; do | |
wget -q --tries=10 --timeout=20 --spider http://google.com | |
if [[ $? -eq 0 ]]; then | |
anybar green | |
else | |
anybar red | |
fi | |
done | |
} | |
nohup drip > /dev/null & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment