lilalo

diff l3-agent @ 106:53b890d1ae90

small changes
author devi
date Fri Aug 04 17:41:31 2006 +0300 (2006-08-04)
parents 3058ada85a58
children 0d49f33696b3
line diff
     1.1 --- a/l3-agent	Sat Feb 25 08:31:35 2006 +0200
     1.2 +++ b/l3-agent	Fri Aug 04 17:41:31 2006 +0300
     1.3 @@ -698,6 +698,7 @@
     1.4  
     1.5          # Начинаем вывод команды
     1.6          print OUT "<command>\n";
     1.7 +        print OUT "<l3cd>$Config{l3cd}</l3cd>\n" if $Config{"l3cd"};
     1.8          for my $element (qw(
     1.9              local_session_id
    1.10              history
    1.11 @@ -755,6 +756,7 @@
    1.12      open(OUT, ">>", $output_filename)
    1.13          or die "Can't open $output_filename for writing\n";
    1.14      print OUT "<session>\n";
    1.15 +    print OUT "<l3cd>$Config{l3cd}</l3cd>\n" if $Config{"l3cd"};
    1.16      my %session = %{$Sessions{$local_session_id}};
    1.17      for my $key (keys %session) {
    1.18          print OUT "<$key>".$session{$key}."</$key>\n";
    1.19 @@ -822,6 +824,11 @@
    1.20      $Killed = 1;
    1.21  }
    1.22  
    1.23 +sub reload
    1.24 +{
    1.25 +    init_config;
    1.26 +}
    1.27 +
    1.28  sub main
    1.29  {
    1.30  
    1.31 @@ -894,7 +901,9 @@
    1.32  
    1.33              $0 = $Config{"l3-agent"};
    1.34              
    1.35 -            $SIG{INT} = $SIG{TERM} = $SIG{HUP} = \&process_was_killed;
    1.36 +            $SIG{INT} = $SIG{TERM} = \&process_was_killed;
    1.37 +            $SIG{HUP} = \&reload;
    1.38 +
    1.39          }
    1.40          while (not $Killed) {
    1.41              @Command_Lines = ();