Browse Source

surveillance de l'HORLOGE

master
heuzef 5 years ago
parent
commit
0e9af198a1
1 changed files with 31 additions and 2 deletions
  1. +31
    -2
      scripts/check_services.sh

+ 31
- 2
scripts/check_services.sh View File

@@ -4,9 +4,39 @@

echo "********************"
date
echo "********************"
echo

/usr/local/bin/gpio -g write 18 1
# HORLOGE
if timedatectl status | grep -q 'Time zone: Europe/Paris (CEST, +0200)'
then
if timedatectl status | grep -q 'Network time on: yes'
then
if timedatectl status | grep -q 'NTP synchronized: yes'
then
if timedatectl status | grep -q 'RTC in local TZ: no'
then
echo "[✅ OK] Horloge"
else
echo "[❌ ERREUR] Horloge - RTC in local TZ"
/usr/local/bin/gpio -g write 18 1
exit
fi
else
echo "[❌ ERREUR] Horloge - NTP not synchronized"
/usr/local/bin/gpio -g write 18 1
exit
fi
else
echo "[❌ ERREUR] Horloge - Network time is OFF"
/usr/local/bin/gpio -g write 18 1
exit
fi
else
echo "[❌ ERREUR] Horloge - Bad Timezone"
/usr/local/bin/gpio -g write 18 1
exit
fi

# LOG2RAM
if mount | grep -q 'log2ram on /var/log type tmpfs'
@@ -58,7 +88,6 @@ else
exit
fi


# INTERNET

# tester 5 ping


Loading…
Cancel
Save