Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 67b21d42

Von Moritz Bunkus vor fast 14 Jahren hinzugefügt

  • ID 67b21d425476471298e0b2e3f5dcacc025ebaaaf
  • Vorgänger 2c1c6a9a
  • Nachfolger a99b261f

config/lx_office.conf.default einlesen, wenn config/lx_office.conf nicht existiert

Unterschiede anzeigen:

scripts/task_server.pl
16 16
}
17 17

  
18 18
use CGI qw( -no_xhtml);
19
use Config::Std;
20 19
use Cwd;
21 20
use Daemon::Generic;
22 21
use Data::Dumper;
......
29 28
use SL::Form;
30 29
use SL::Helper::DateTime;
31 30
use SL::LXDebug;
31
use SL::LxOfficeConf;
32 32
use SL::Locale;
33 33

  
34 34
our %lx_office_conf;
......
89 89
sub gd_preconfig {
90 90
  my $self = shift;
91 91

  
92
  read_config $self->{configfile} => %lx_office_conf;
92
  SL::LxOfficeConf->read;
93 93

  
94 94
  die "Missing section [task_server] in config file"                unless $lx_office_conf{task_server};
95 95
  die "Missing key 'login' in section [task_server] in config file" unless $lx_office_conf{task_server}->{login};
......
136 136

  
137 137
mkdir($pidbase) if !-d $pidbase;
138 138

  
139
newdaemon(configfile => "${cwd}/config/lx_office.conf",
139
my $file = -f "${cwd}/config/lx_office.conf" ? "${cwd}/config/lx_office.conf" : "${cwd}/config/lx_office.conf.default";
140
newdaemon(configfile => $file,
140 141
          progname   => 'lx-office-task-server',
141 142
          pidbase    => "${pidbase}/",
142 143
          );

Auch abrufbar als: Unified diff