Browse Source

Ajout chemin absolu /usr/sbin/service

master
heuzef 5 years ago
parent
commit
9e298512f8
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      scripts/check_services.sh

+ 3
- 3
scripts/check_services.sh View File

@@ -19,7 +19,7 @@ else
fi

# APACHE
if service apache2 status | grep -q 'running'
if /usr/sbin/service apache2 status | grep -q 'running'
then
echo "[✅ OK] Apache"
else
@@ -29,7 +29,7 @@ else
fi

# CRON
if service cron status | grep -q 'running'
if /usr/sbin/service cron status | grep -q 'running'
then
echo "[✅ OK] Cron"
else
@@ -53,7 +53,7 @@ fi
# INTERNET

# tester 5 ping
if ping -c5 8.8.8.8 | grep -q '0% packet loss'
if ping -c5 1.1.1.1 | grep -q '0% packet loss'
# Si la reponse est 0 paquets perdu, alors OK
then
echo "[✅ OK] Internet"


Loading…
Cancel
Save