Commit 527606f4 authored by Olav Kvittem's avatar Olav Kvittem

change behaviour so that -f means do not report existing task.log events to big brother


git-svn-id: file:///home/svn/sipshaman/trunk@36 9383e1fa-a92b-456e-b4ec-45f0d4f7abeb
parent 53d40130
...@@ -36,6 +36,7 @@ our $tz=DateTime::TimeZone->new( name => 'local' ); ...@@ -36,6 +36,7 @@ our $tz=DateTime::TimeZone->new( name => 'local' );
$tmp="/tmp/qstream-sipp-$$.xml"; $tmp="/tmp/qstream-sipp-$$.xml";
my $at_end_of_file=0; # is at end of TASKLOG
my $endooflife=0; my $endooflife=0;
if ($opt_die){ if ($opt_die){
...@@ -62,8 +63,10 @@ foreach $tasklog(@ARGV){ ...@@ -62,8 +63,10 @@ foreach $tasklog(@ARGV){
&process_line($line); &process_line($line);
} else { } else {
last if !$opt_f; last if !$opt_f;
$at_end_of_file=1 if ! $at_end_of_file; # set true at first eof
sleep $timeout; sleep $timeout;
} }
exit(1) if $opt_die && (time > $endoflife); exit(1) if $opt_die && (time > $endoflife);
...@@ -243,6 +246,7 @@ sub bb_color { ...@@ -243,6 +246,7 @@ sub bb_color {
sub bb_report { sub bb_report {
return 0 if $opt_f && ! $at_end_of_file;
my ($bbtest, $machine, $color, $msg)=@_; my ($bbtest, $machine, $color, $msg)=@_;
# my $cmd="/usr/lib/hobbit/client/bin/bb $bb_host 'status $machine.$bbtest $color $msg\n'>>$ENV{HOME}/cmd.log 2>&1"; # my $cmd="/usr/lib/hobbit/client/bin/bb $bb_host 'status $machine.$bbtest $color $msg\n'>>$ENV{HOME}/cmd.log 2>&1";
my $cmd="/usr/lib/hobbit/client/bin/bb $bb_host 'status $machine.$bbtest $color $msg\n'"; my $cmd="/usr/lib/hobbit/client/bin/bb $bb_host 'status $machine.$bbtest $color $msg\n'";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment