- 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;
+ }