fix for null traffic data

This commit is contained in:
Serghey Rodin 2013-04-08 12:37:11 +03:00
commit 405cd4bdb1

View file

@ -45,7 +45,9 @@ for domain in $(search_objects 'web' 'SUSPENDED' "no" 'DOMAIN'); do
while read line; do
if [[ "$line" =~ ^[0-9]+$ ]]; then
line=${line#0}
bytes=$(($bytes + $line))
if [ ! -z "$line" ]; then
bytes=$(($bytes + $line))
fi
fi
done < $log_file