Pārlūkot izejas kodu

surveillance du service SSH

master
heuzef pirms 5 gadiem
vecāks
revīzija
513b6c58f0
1 mainītis faili ar 11 papildinājumiem un 2 dzēšanām
  1. +11
    -2
      scripts/check_services.sh

+ 11
- 2
scripts/check_services.sh Parādīt failu

@@ -31,13 +31,22 @@ fi
# CRON
if /usr/sbin/service cron status | grep -q 'running'
then
echo "[✅ OK] Cron"
echo "[✅ OK] CRON"
else
echo "[❌ ERREUR] Cron"
echo "[❌ ERREUR] CRON"
/usr/local/bin/gpio -g write 18 1
exit
fi

# SSH
if /usr/sbin/service ssh status | grep -q 'running'
then
echo "[✅ OK] SSH"
else
echo "[❌ ERREUR] SSH"
/usr/local/bin/gpio -g write 18 1
exit
fi

# WIRINGPI
if /usr/local/bin/gpio -v | head -n 1 | grep -q 'gpio version: [0-9]'


Notiek ielāde…
Atcelt
Saglabāt