Revision db7dbf26
Von Moritz Bunkus vor etwa 12 Jahren hinzugefügt
SL/System/TaskServer.pm | ||
---|---|---|
20 | 20 |
ERR_PROCESS => -2, |
21 | 21 |
}; |
22 | 22 |
|
23 |
use constant PID_BASE => "users/pid"; |
|
24 |
|
|
23 | 25 |
sub status { |
24 | 26 |
my ($self) = @_; |
25 | 27 |
|
... | ... | |
65 | 67 |
my $exe_dir = SL::System::Process->exe_dir; |
66 | 68 |
|
67 | 69 |
foreach my $conf (qw(kivitendo.conf lx_office.conf kivitendo.conf.default)) { |
68 |
my $pid_file_name = join '.', splitdir($exe_dir), "config.${conf}.pid"; |
|
69 |
my $pid_file_path = catfile(catdir($exe_dir, 'users', 'pid'), $pid_file_name); |
|
70 |
my $pid_file_path = catfile(catdir($exe_dir, splitdir(PID_BASE())), "config.${conf}.pid"); |
|
70 | 71 |
|
71 | 72 |
return join('', read_file($pid_file_path)) * 1 if -f $pid_file_path; |
72 | 73 |
} |
Auch abrufbar als: Unified diff
Task-Server: PID-File nur aus relativem Konfigurationsdateinamen ableiten