Update nginx.pm

It didn't work for me until I edited that condition to match the part of code where ipconfig rule is created.
This commit is contained in:
K3A 2013-06-12 14:04:39 +02:00
parent b8baf09891
commit 7683fac3fe
1 changed files with 2 additions and 2 deletions

View File

@ -142,7 +142,7 @@ sub nginx_update {
my $val;
open(IN, "iptables -nxvL INPUT |");
while(<IN>) {
if(/ nginx_IN /) {
if(/ monitorix_nginx_IN /) {
(undef, $val) = split(' ', $_);
chomp($val);
$in = $val - ($config->{nginx_hist}->{'in'} || 0);
@ -155,7 +155,7 @@ sub nginx_update {
close(IN);
open(IN, "iptables -nxvL OUTPUT |");
while(<IN>) {
if(/ nginx_IN /) {
if(/ monitorix_nginx_IN /) {
(undef, $val) = split(' ', $_);
chomp($val);
$out = $val - ($config->{nginx_hist}->{'out'} || 0);