Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision db7dbf26

Von Moritz Bunkus vor etwa 12 Jahren hinzugefügt

Task-Server: PID-File nur aus relativem Konfigurationsdateinamen ableiten

Unterschiede anzeigen:

scripts/task_server.pl
21 21
use Data::Dumper;
22 22
use DateTime;
23 23
use English qw(-no_match_vars);
24
use File::Spec;
24 25
use List::Util qw(first);
25 26
use POSIX qw(setuid setgid);
26 27
use SL::Auth;
......
32 33
use SL::LXDebug;
33 34
use SL::LxOfficeConf;
34 35
use SL::Locale;
36
use SL::System::TaskServer;
35 37

  
36 38
our %lx_office_conf;
37 39

  
......
141 143
  }
142 144
}
143 145

  
144
my $cwd     = getcwd();
145
my $pidbase = "${cwd}/users/pid";
146
chdir $exe_dir;
146 147

  
147
mkdir($pidbase) if !-d $pidbase;
148
mkdir SL::System::TaskServer::PID_BASE() if !-d SL::System::TaskServer::PID_BASE();
149

  
150
my $file = first { -f } ("${exe_dir}/config/kivitendo.conf", "${exe_dir}/config/lx_office.conf", "${exe_dir}/config/kivitendo.conf.default");
151

  
152
die "No configuration file found." unless $file;
153

  
154
$file = File::Spec->abs2rel(Cwd::abs_path($file), Cwd::abs_path($exe_dir));
148 155

  
149
my $file = first { -f } ("${cwd}/config/kivitendo.conf", "${cwd}/config/lx_office.conf", "${cwd}/config/kivitendo.conf.default");
150 156
newdaemon(configfile => $file,
151 157
          progname   => 'kivitendo-task-server',
152
          pidbase    => "${pidbase}/",
158
          pidbase    => SL::System::TaskServer::PID_BASE() . '/',
153 159
          );
154 160

  
155 161
1;

Auch abrufbar als: Unified diff