浏览代码

surveillance du service SSH

master
heuzef 5 年前
父节点
当前提交
513b6c58f0
共有 1 个文件被更改,包括 11 次插入2 次删除
  1. +11
    -2
      scripts/check_services.sh

+ 11
- 2
scripts/check_services.sh 查看文件

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


正在加载...
取消
保存