--- lib/PXElator/daemons.pm 2009/08/17 15:14:58 245 +++ lib/PXElator/daemons.pm 2009/08/28 16:20:43 321 @@ -32,13 +32,15 @@ CouchDB::audit( $msg, $daemon, { daemon => $daemon, message => $msg, @_ } ); } +mkdir "$server::conf/pid" unless -d "$server::conf/pid"; + sub start_stop { my $daemon = shift; my $pid = $pids->{$daemon}; - my $pid_path = "$daemon.pid"; + my $pid_path = $daemon; $pid_path =~ s{/}{-}g; - $pid_path = "$server::conf/$pid_path"; + $pid_path = "$server::conf/pid/$pid_path"; if ( ! $pid && -e $pid_path ) { my $p = read_file $pid_path;