Revision a63be3ad
Von Moritz Bunkus vor etwa 12 Jahren hinzugefügt
SL/System/TaskServer.pm | ||
---|---|---|
61 | 61 |
sub _read_pid { |
62 | 62 |
my ($self) = @_; |
63 | 63 |
|
64 |
my $exe_dir = SL::System::Process->exe_dir; |
|
65 |
my $pid_file_name = join '.', splitdir($exe_dir), 'config.lx_office.conf.pid'; |
|
66 |
my $pid_file_path = catfile(catdir($exe_dir, 'users', 'pid'), $pid_file_name); |
|
64 |
my $exe_dir = SL::System::Process->exe_dir; |
|
67 | 65 |
|
68 |
return undef unless -f $pid_file_path; |
|
69 |
return join('', read_file($pid_file_path)) * 1; |
|
66 |
foreach my $conf (qw(kivitendo.conf lx_office.conf kivitendo.conf.default)) { |
|
67 |
my $pid_file_name = join '.', splitdir($exe_dir), "config.${conf}.pid"; |
|
68 |
my $pid_file_path = catfile(catdir($exe_dir, 'users', 'pid'), $pid_file_name); |
|
69 |
|
|
70 |
return join('', read_file($pid_file_path)) * 1 if -f $pid_file_path; |
|
71 |
} |
|
70 | 72 |
} |
71 | 73 |
|
72 | 74 |
sub _run_script_command { |
scripts/task_server.pl | ||
---|---|---|
21 | 21 |
use Data::Dumper; |
22 | 22 |
use DateTime; |
23 | 23 |
use English qw(-no_match_vars); |
24 |
use List::Util qw(first); |
|
24 | 25 |
use POSIX qw(setuid setgid); |
25 | 26 |
use SL::Auth; |
26 | 27 |
use SL::DB::BackgroundJob; |
... | ... | |
143 | 144 |
|
144 | 145 |
mkdir($pidbase) if !-d $pidbase; |
145 | 146 |
|
146 |
my $file = -f "${cwd}/config/lx_office.conf" ? "${cwd}/config/lx_office.conf" : "${cwd}/config/lx_office.conf.default";
|
|
147 |
my $file = first { -f } ("${cwd}/config/kivitendo.conf", "${cwd}/config/lx_office.conf", "${cwd}/config/kivitendo.conf.default");
|
|
147 | 148 |
newdaemon(configfile => $file, |
148 | 149 |
progname => 'kivitendo-task-server', |
149 | 150 |
pidbase => "${pidbase}/", |
Auch abrufbar als: Unified diff
Task-Server und -Control-Modul auf neue Konfigurationsdateinamen angepasst