Browse Source

surveillance du service SSH

master
heuzef 5 years ago
parent
commit
513b6c58f0
1 changed files with 11 additions and 2 deletions
  1. +11
    -2
      scripts/check_services.sh

+ 11
- 2
scripts/check_services.sh View File

@@ -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]'


Loading…
Cancel
Save