|
|
@@ -6,7 +6,7 @@ echo "********************" |
|
|
|
date |
|
|
|
echo |
|
|
|
|
|
|
|
gpio -g write 18 1 |
|
|
|
/usr/local/bin/gpio -g write 18 1 |
|
|
|
|
|
|
|
# LOG2RAM |
|
|
|
if mount | grep -q 'log2ram on /var/log type tmpfs' |
|
|
@@ -14,7 +14,7 @@ then |
|
|
|
echo "[✅ OK] Log2Ram" |
|
|
|
else |
|
|
|
echo "[❌ ERROR] Log2Ram" |
|
|
|
gpio -g write 18 1 |
|
|
|
/usr/local/bin/gpio -g write 18 1 |
|
|
|
exit |
|
|
|
fi |
|
|
|
|
|
|
@@ -24,7 +24,7 @@ then |
|
|
|
echo "[✅ OK] Apache" |
|
|
|
else |
|
|
|
echo "[❌ ERROR] Apache" |
|
|
|
gpio -g write 18 1 |
|
|
|
/usr/local/bin/gpio -g write 18 1 |
|
|
|
exit |
|
|
|
fi |
|
|
|
|
|
|
@@ -34,18 +34,18 @@ then |
|
|
|
echo "[✅ OK] Cron" |
|
|
|
else |
|
|
|
echo "[❌ ERROR] Cron" |
|
|
|
gpio -g write 18 1 |
|
|
|
/usr/local/bin/gpio -g write 18 1 |
|
|
|
exit |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
# WIRINGPI |
|
|
|
if gpio -v | head -n 1 | grep -q 'gpio version: [0-9]' |
|
|
|
if /usr/local/bin/gpio -v | head -n 1 | grep -q 'gpio version: [0-9]' |
|
|
|
then |
|
|
|
echo "[✅ OK] WiringPi" |
|
|
|
else |
|
|
|
echo "[❌ ERROR] WiringPi" |
|
|
|
gpio -g write 18 1 |
|
|
|
/usr/local/bin/gpio -g write 18 1 |
|
|
|
exit |
|
|
|
fi |
|
|
|
|
|
|
@@ -76,13 +76,13 @@ else |
|
|
|
# Mais si le probleme est toujours present, alors on alerte : |
|
|
|
else |
|
|
|
echo "[❌ ERROR] Internet" |
|
|
|
gpio -g write 18 1 |
|
|
|
/usr/local/bin/gpio -g write 18 1 |
|
|
|
exit |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
# Tout va bien ^_^ Allumage de la LED d'etat. |
|
|
|
gpio -g write 18 0 |
|
|
|
/usr/local/bin/gpio -g write 18 0 |
|
|
|
echo |
|
|
|
echo "[✅ OK] Tout va bien 👌" |
|
|
|
echo "********************" |
|
|
|