#!/bin/bash #Variaveis CLIENTE=$([ -e /hdaux/cliente ] && cat /hdaux/cliente) HD=$(df -h | egrep "/$|/hd2$" | egrep -o "[0-9]+%" | cut -d "%" -f1) MAXIMO="80" EMAIL="suporte@simplesip.com.br" IP_CENTRAL_SIP=$(ifconfig | grep "inet " | grep -v "127.0.0.1" | awk {'print $2'} | sed -e 's/addr://g'| sed -e 's/^/IP-CENTRAL-SIP:/g') for i in $HD do [ "$i" -gt "$MAXIMO" ] && echo -e "Subject: DISCO COM ESPACO COMPROMETIDO - CLIENTE:$CLIENTE \nCONSUMO DO DISCO:$i \n$IP_CENTRAL_SIP" | msmtp -t $EMAIL done