PABX da Simples IP
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
513 B

#!/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