]> wagnertech.de Git - kivitendo-erp.git/blobdiff - SL/System/TaskServer.pm
Task-Server und -Control-Modul auf neue Konfigurationsdateinamen angepasst
[kivitendo-erp.git] / SL / System / TaskServer.pm
index bceb8f59803f7616e9b765d1b29438bbf50b6eb4..17be8edac86e5bfe4ddfeee4c269a8a3f61e631f 100644 (file)
@@ -61,12 +61,14 @@ sub wake_up {
 sub _read_pid {
   my ($self) = @_;
 
-  my $exe_dir       = SL::System::Process->exe_dir;
-  my $pid_file_name = join '.', splitdir($exe_dir), 'config.lx_office.conf.pid';
-  my $pid_file_path = catfile(catdir($exe_dir, 'users', 'pid'), $pid_file_name);
+  my $exe_dir = SL::System::Process->exe_dir;
 
-  return undef unless -f $pid_file_path;
-  return join('', read_file($pid_file_path)) * 1;
+  foreach my $conf (qw(kivitendo.conf lx_office.conf kivitendo.conf.default)) {
+    my $pid_file_name = join '.', splitdir($exe_dir), "config.${conf}.pid";
+    my $pid_file_path = catfile(catdir($exe_dir, 'users', 'pid'), $pid_file_name);
+
+    return join('', read_file($pid_file_path)) * 1 if -f $pid_file_path;
+  }
 }
 
 sub _run_script_command {