Online LED

Script for external LEDs:

#!/bin/sh

#  based on scancom.sh (macos)
#  ABIERTO VERSION 1.1 (bash, bash, python, time.sleep 60)

adress=www.google.com
#adress=10.10.10.10
#adress=10.10.10.20
#adress=projects45raspberry.com

time=1
pings=1

while [ $loop 1 ] ; do
ping -c $pings $adress > /dev/null #routing
if [ $? != 0 ]
then
sh /home/pi/online/offlineLED.sh
echo "$adress not online" &>/dev/null
echo "$time seconds period"
else
sh /home/pi/online/onlineLED.sh
echo "$adress online" &>/dev/null
echo "$time seconds period"
fi

sleep $time


done
sleep 0
done
Complete archiv: Download ZIP, 4 KB –>