check.sh (view raw)
1#!/bin/bash
2#Before you run this script, make sure wget is installed and check https://github.com/mashlol/notify
3
4#ADD NOTIFY KEY HERE
5notify -r insertkeyhere
6
7#EDIT LINK OF THE WEBPAGE TO CHECK
8LINK=insertlinkhere
9
10#YOU CAN EDIT THE INTERVAL, I SET IT TO 300s = 5 minutes
11INTERVAL=300
12
13
14wget -O temp $LINK --quiet
15SIZE1=$(stat -c%s "temp")
16rm temp
17SIZE2=$SIZE1
18I=0
19while [ "$SIZE1" -eq "$SIZE2" ]; do
20 sleep $INTERVAL
21 echo $I
22 wget -O temp $LINK --quiet
23 SIZE2=$(stat -c%s "temp")
24 rm temp
25 let I=I+1
26done
27
28notify -t "Sono usciti i risultati di Analisi II!"