From ea5920ea1a4d18a9fb3b003230e7c27a503645f4 Mon Sep 17 00:00:00 2001 From: jfontaine35 <76435797+jfontaine35@users.noreply.github.com> Date: Fri, 16 Jul 2021 09:39:05 +0200 Subject: [PATCH] Update .profile --- .profile | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.profile b/.profile index fb600d0..3476e68 100644 --- a/.profile +++ b/.profile @@ -41,6 +41,8 @@ echo "Note: Toutes actions sur ce serveur sont enregistrees." echo "------------------------------------------------------" echo "Date : $(date) " echo "Uptime : $(uptime -p)" +echo "Temp : $(cat /sys/devices/platform/coretemp.0/hwmon/hwmon1/temp2_input|sed 's/\(.\)..$/.\1°C/')" + # Disk : Verification de l'espace restant FD=$(echo $(disk | cut -d ':' -f5)| cut -d '%' -f1) @@ -48,16 +50,16 @@ FD=$(echo $(disk | cut -d ':' -f5)| cut -d '%' -f1) echo -e "Disk : Use->$(disk | cut -d ':' -f3) / Free->$(disk | cut -d ':' -f4) (Use: $libre)" # Verification des services Web -pidof "mysqld" >/dev/null && echo -e "MariaDB : \e[01;32;7m Service actif \e[0m" || echo -e "MariaDB : \e[41;37;5m Service inactif \e[0m" -pidof "apache2" >/dev/null && echo -e "Apache2 : \e[01;32;7m Service actif \e[0m" || echo -e "Apache2 : \e[41;37;5m Service inactif \e[0m" -pidof "fusioninventory" >/dev/null && echo -e "Fusion : \e[01;32;7m Service actif \e[0m" || echo -e "Fusion : \e[41;37;5m Service inactif \e[0m" +#pidof "mysqld" >/dev/null && echo -e "MariaDB : \e[01;32;7m Service actif \e[0m" || echo -e "MariaDB : \e[41;37;5m Service inactif \e[0m" +#pidof "apache2" >/dev/null && echo -e "Apache2 : \e[01;32;7m Service actif \e[0m" || echo -e "Apache2 : \e[41;37;5m Service inactif \e[0m" +#pidof "fusioninventory" >/dev/null && echo -e "Fusion : \e[01;32;7m Service actif \e[0m" || echo -e "Fusion : \e[41;37;5m Service inactif \e[0m" # Verification des services Proxmox -pidof "pvedaemon" >/dev/null && echo -e "PVE : \e[01;32;7m Service actif \e[0m" || echo -e "PVE : \e[41;37;5m Service inactif \e[0m" -pidof "pveproxy" >/dev/null && echo -e "PVE-Proxy: \e[01;32;7m Service actif \e[0m" || echo -e "PVE-Proxy: \e[41;37;5m Service inactif \e[0m" +#pidof "pvedaemon" >/dev/null && echo -e "PVE : \e[01;32;7m Service actif \e[0m" || echo -e "PVE : \e[41;37;5m Service inactif \e[0m" +#pidof "pveproxy" >/dev/null && echo -e "PVE-Proxy: \e[01;32;7m Service actif \e[0m" || echo -e "PVE-Proxy: \e[41;37;5m Service inactif \e[0m" # Vérification du serveur de temps -pidof "ntpd" >/dev/null && echo -e "NTP : \e[01;32;7m Service actif \e[0m" || echo -e "NTP : \e[41;37;5m Service inactif \e[0m" +#pidof "ntpd" >/dev/null && echo -e "NTP : \e[01;32;7m Service actif \e[0m" || echo -e "NTP : \e[41;37;5m Service inactif \e[0m" # Vérification du serveur CUPS -pidof "avahi-daemon" >/dev/null && echo -e "CUPS : \e[01;32;7m Service actif \e[0m" || echo -e "CUPS : \e[41;37;5m Service inactif \e[0m" +#pidof "avahi-daemon" >/dev/null && echo -e "CUPS : \e[01;32;7m Service actif \e[0m" || echo -e "CUPS : \e[41;37;5m Service inactif \e[0m" # Envoie du mail d'alertes de connexion. echo "Merci de vérifier que vous êtes bien à l'originie de cette connexion." | mail -s "Connexion sur : $HOSTNAME avec le compte : $USER" admin@h3campus.fr