diff --git a/files/usr/local/bin/snrlog b/files/usr/local/bin/snrlog index 32af2a32..56eb892a 100755 --- a/files/usr/local/bin/snrlog +++ b/files/usr/local/bin/snrlog @@ -2,14 +2,14 @@ BEGIN {push @INC, '/www/cgi-bin'}; use perlfunc; -my $filename = '/tmp/snrlog'; -# my $MAXLINES=48960; # 17bytes * 60mins * 24 hours * 2 days -my $MAXLINES=132480; # 23bytes * 60mins * 24 hours * 4 days +my $filename = '/tmp/snrlog'; +my $MAXLINES=2880; # 2days worth ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=localtime(time); $d = sprintf ("%02d/%02d %02d:%02d:%02d",$mon, $mday,$hour, $min, $sec); ($s, $n) = get_wifi_signal(get_interface("wifi")); -$s = $n if $s eq "N/A"; +$s = 0 if $s eq "N/A"; +$n = 0 if $n eq "N/A"; open(my $fh, '>>', $filename) or die "Could not open file '$filename' $!"; print $fh "$d,$s,$n\n";