Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. #!/bin/bash
  2.  
  3. #
  4.  
  5. # Thiago Laurito (thiago.laurito@gmail.com ==> slackdummies.blogspot.com)
  6. # Script de monitoramento do access.log do Squid
  7. # Tamanho a ser testado 1G
  8.  (1024004).
  9.  
  10. #
  11.  
  12. ARQTAM="$(du /var/log/squid/access.log | awk '{ print $1 }' )"
  13.  
  14.  
  15.  
  16. if  [ $ARQTAM -le 1024004 ] ; then
  17.  
  18.         exit 0
  19.  
  20. else
  21.  
  22.         > /var/log/squid/access.log ; squid -k reconfigure
  23.  
  24. fi