Actualizar 'vnstati.sh'
This commit is contained in:
parent
7b548f5a2b
commit
7ba40cc48e
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
if ! command -v vnstati >/dev/null; then echo "I require vnstati but it's not installed."; apt install vnstati; else echo "vnstati OK"; fi;
|
||||
if ! command -v sendmail >/dev/null; then echo "I require sendmial but it's not installed."; apt install sendmail; else echo "sendmail OK"; fi;
|
||||
if ! command -v vnstati >/dev/null; then echo "I require vnstati but it's not installed."; sudo apt install vnstati; else echo "vnstati OK"; fi;
|
||||
if ! command -v sendmail >/dev/null; then echo "I require sendmial but it's not installed."; sudo apt install sendmail; else echo "sendmail OK"; fi;
|
||||
IFACE=$(ip -br l | awk '$1 !~ "lo|vir|vet|br|docker" { print $1}')
|
||||
for i in $IFACE;do
|
||||
vnstati -d 7 -i $i -o $i.png
|
||||
|
@ -27,8 +27,7 @@ done
|
|||
/usr/sbin/sendmail -t <<EOT
|
||||
TO: alfonso@vivancos.eu
|
||||
FROM: alfonso@cayuela.eu
|
||||
BCC: vivancos@gmail.com
|
||||
SUBJECT: Cayuela traffic summary $(date +%c)
|
||||
SUBJECT: $HOSTNAME traffic summary $(date +%c)
|
||||
MIME-Version: 1.0
|
||||
Content-Type: multipart/related;boundary="XYZ"
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user