In the old TOS 6, I used this function to check connections. It checked the gateway, DNS servers and selected IP addresses on the internet.
It indicated the start of the check and if there was a connection error, the type of connection.
After changing the syntax it is not functional.
I will ask a willing and knowledgeable person, who will not cost too much time, to make the necessary modifications fiel to make it work on the current version, please
# rainbow brightness od verze 7.x.x
# zmena intensity svetla den - noc ... mezi 0-8 nebo -p 0-255
bright
#1 - 30
#2 - 63
#3 - 94
#4 - 127
#5 - 158
#6 - 191
#7 - 221
#8 - 255
# WINTER
# 00 08 * * * root rainbow brightness -p 4
# 00 09 * * * root rainbow brightness -p 6
# 00 10 * * * root rainbow brightness -p 8
# 00 15 * * * root rainbow brightness -p 6
# 00 16 * * * root rainbow brightness -p 4
# 00 17 * * * root rainbow brightness -p 2
# */2 * * * * /usr/bin/rainbow brightness -p 2
# 1-59/2 * * * * /usr/bin/rainbow brightness -p 10
# SPRING - AUTUMN
00 06 * * * root rainbow brightness -p 4
00 07 * * * root rainbow brightness -p 6
00 08 * * * root rainbow brightness -p 8
00 18 * * * root rainbow brightness -p 6
00 19 * * * root rainbow brightness -p 4
00 20 * * * root rainbow brightness -p 2
# SUMMER
#00 05 * * * root rainbow brightness -p 4
#00 06 * * * root rainbow brightness -p 6
#00 07 * * * root rainbow brightness -p 8
#00 20 * * * root rainbow brightness -p 6
#00 21 * * * root rainbow brightness -p 4
#00 22 * * * root rainbow brightness -p 2
# -------------------------------------
# check every 3 minute
# */3 * * * * root /root/connCheck.sh > /dev/null 2>&1
*/3 * * * * root /root/connCheck.sh
#!/bin/sh
# výše je deklarace scriptu
# umístění
# /root/conncheck.sh
# aktivovat následujícím příkazem
# chmod +x /root/connCheck.sh
# check the connection to the Internet
# --- indications of activity befor test
# 1 blick
rainbow disable
sleep 1
rainbow d000f0 enable
sleep 1
# 2 blick
rainbow disable
sleep 1
rainbow d000f0 enable
sleep 1
# 3 blick
rainbow disable
sleep 1
rainbow d000f0 enable
sleep 1
rainbow disable
sleep 1
#
rainbow 4d0000 enable
# --- check connection gateway, dns, internet ---
# "93.91.1.200-2" non-existent IP for testing functions
# check gateway ... wan, lan, pci = RED
# if !(ping -W 1 -c 1 10.48.210.229)
# testovaci pozice
if !(ping -c 1 93.91.1.200)
then
rainbow power b50000 auto
rainbow wan b50000 auto
rainbow lan-1 b50000 enable
rainbow lan-2 b50000 enable
rainbow lan-3 b50000 enable
rainbow lan-4 b50000 enable;
# check DNS ... wan, lan = ORANGE
elif !(ping -W 1 -c 1 10.255.255.10) && !(ping -W 1 -c 10.255.255.20)
# testovaci pozice
#elif !(ping -c 1 93.91.1.200) && !(ping -c 93.91.1.201)
then
rainbow wan db4e00 enable
rainbow lan-1 db4e00 enable
rainbow lan-2 db4e00 enable
rainbow lan-3 db4e00 enable
rainbow lan-4 db4e00 enable;
# check internet - wan, pci = PURPLE (Amazon.de; Ceske noviny; www.emergie-info.fr)
elif !(ping -W 1 -c 1 162.219.224.163) && !(ping -W 1 -c 1 80.79.27.48) && !(ping -W 1 -c 1 46.18.193.118)
# testovaci pozice
#elif !(ping -c 1 93.91.1.200) && !(ping -c 1 46.255.231.42) && !(ping -c 1 216.58.205.228)
then
rainbow power d000f0 enable
rainbow wan d000f0 enable;
# if all ready - standard color
else
rainbow power b50000 auto
rainbow wan 0118e4 auto
rainbow lan-1 4e4d0e auto
rainbow lan-2 4e4d0e auto
rainbow lan-3 4e4d0e auto
rainbow lan-4 4e4d0e auto;
fi