Browse Source

Cut blank lines when counting domains for IP addresses to prevent reporting 1 for an IP that has zero.

Cameron McDonald 11 năm trước cách đây
mục cha
commit
bb145d234a
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      bin/v-update-sys-ip-counters

+ 1 - 1
bin/v-update-sys-ip-counters

@@ -45,7 +45,7 @@ for ip in $ip_list; do
 
     # Calculate usage
     ip_usage=$(grep -H $ip $VESTA/data/users/*/web.conf)
-    web_domains=$(echo "$ip_usage"| wc -l)
+    web_domains=$(echo "$ip_usage" | sed '/^$/' | wc -l)
     sys_users=$(echo "$ip_usage" | cut -f7 -d/ | sort -u |\
         tr '\n' ',' | sed "s/,$//g")