/[pxelator]/lib/PXElator/daemons.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /lib/PXElator/daemons.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 224 by dpavlin, Wed Aug 12 23:59:01 2009 UTC revision 225 by dpavlin, Sun Aug 16 00:03:30 2009 UTC
# Line 10  use x11; Line 10  use x11;
10  use CouchDB;  use CouchDB;
11    
12  our $pids;  our $pids;
13  $pids = { httpd => $$, kvm => 'not started' } unless defined $pids; # keep pids on refresh  $pids = {
14            httpd => $$,
15            kvm => 'not started',
16            wireshark => 'not started',
17    } unless defined $pids; # keep pids on refresh
18    
19  sub DESTROY {  sub DESTROY {
20          warn "pids ",dump( $pids );          warn "pids ",dump( $pids );
# Line 32  sub start_stop { Line 36  sub start_stop {
36          my $daemon = shift;          my $daemon = shift;
37    
38          my $pid = $pids->{$daemon};          my $pid = $pids->{$daemon};
39          my $pid_path = "$server::conf/$daemon.pid";          my $pid_path = "$daemon.pid";
40            $pid_path =~ s{/}{-}g;
41            $pid_path = "$server::conf/$pid_path";
42    
43          if ( ! $pid && -e $pid_path ) {          if ( ! $pid && -e $pid_path ) {
44                  my $p = read_file $pid_path;                  my $p = read_file $pid_path;

Legend:
Removed from v.224  
changed lines
  Added in v.225

  ViewVC Help
Powered by ViewVC 1.1.26