~scripts
58 itemsDownload ./*

58 itemsDownload ./*

..
display
dzen2
nginx
tiling
vosh
4cdl
4trips
alarm
ambient
battery-monitor
checkit
cleverbot.py
clock
color-gen
colors-hex
colorscheme.sh
compton.sh
dailywall
dmenu
ffthumb
grid
gridmacro
gridmacro.kde
help
importw
indexer
install-all.sh
install-twily.sh
installng
mp3ogg
netspeed.sh
orage
pipes
pipes.x
pipewire_bt.sh
ports
rain
randwall
readystart.sh
rotate.sh
scan.sh
screencast
screencast2
scrot
scrotw
search
skull
slocker
startblender.sh
starwars
streamit
sumnum
synctimedate.sh
tty-colorize
usrmount
ytp
ytplay
zombie-restart.sh


scriptscheckit
2 738•  9 years ago•  DownloadRawClose
9 years ago•  2 738

{}
#!/bin/bash
#
# Usage: ./checkit <url> <interval>
#

GET=""
while true; do
    echo -ne "Checking \033[0;33m\"$1\"\033[0m ... "
    GET=$(curl -Is "$1" | head -1)

    if [[ "$GET" = *200* || "$GET" = *301* || "$GET" = *302* ]]; then
        echo -ne "[\033[1;32mONLINE\033[0m]."
        notify-send "\"$1\" is now ONLINE."
    else
        echo -ne "[\033[1;31mOFFLINE\033[0m]."
    fi

    echo -e "\033[1;30m (Checking again in $2 seconds)\033[0m"
    sleep $2
done

exit 0

Top
©twily.info 2013 - 2024
twily at twily dot info



2 175 704 visits
... ^ v