Update .profile
This commit is contained in:
parent
192d1dbd45
commit
37ae56ca1e
9
.profile
9
.profile
|
|
@ -47,10 +47,17 @@ FD=$(echo $(disk | cut -d ':' -f5)| cut -d '%' -f1)
|
|||
[ $FD -lt $MaxHDUse ] && libre="\e[01;32;7m $FD% \e[0m" || libre="\e[41;37;5m $FD% \e[0m"
|
||||
echo -e "Disk : Use->$(disk | cut -d ':' -f3) / Free->$(disk | cut -d ':' -f4) (Use: $libre)"
|
||||
|
||||
# Verification des services
|
||||
# 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"
|
||||
# Vérification des agents
|
||||
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"
|
||||
# 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"
|
||||
|
||||
# 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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue