kowalskilinux

Untitled

Mar 12th, 2018
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.54 KB | None | 0 0
  1. LINHA1=$(asterisk -rx 'sip show registry'|grep "1122442211"|cut -c 71-91);
  2. IPCORP=$(asterisk -rx 'sip show registry'|grep "1122113344"|cut -c 71-91);
  3. GRP="-241401122"
  4. ASSUNTO="STATUS LINHA SIP"
  5. EMAIL_TO='kowalski@empresa.com.br'
  6. RELAY='server@empresa.com.br'
  7.  
  8. if [ "$IDT" != "Registered" ]; then
  9.      echo 'Linha1 Nao Registrada!' >/tmp/monitorasip.txt
  10.      cat /tmp/monitorasip.txt | mail -s 'Alert Linha1 Down!' -r $RELAY $EMAIL_TO
  11.      ./telegram.sh "$GRP" "$ASSUNTO" "Linha1 Down!"
  12. else
  13.      echo "Linha1 Registrada" | logger
  14.  
  15. fi
Add Comment
Please, Sign In to add comment