Revision 2b82ec61
Von Moritz Bunkus vor fast 14 Jahren hinzugefügt
SL/Dispatcher.pm | ||
---|---|---|
77 | 77 |
|
78 | 78 |
read_config 'config/lx_office.conf' => %::lx_office_conf; |
79 | 79 |
_decode_recursively(\%::lx_office_conf); |
80 |
_init_environment(); |
|
80 | 81 |
|
81 | 82 |
eval { |
82 | 83 |
package main; |
... | ... | |
334 | 335 |
} |
335 | 336 |
} |
336 | 337 |
|
338 |
sub _init_environment { |
|
339 |
my %key_map = ( lib => { name => 'PERL5LIB', append_path => 1 }, |
|
340 |
path => { name => 'PATH', append_path => 1 }, |
|
341 |
); |
|
342 |
my $cfg = $::lx_office_conf{environment} || {}; |
|
343 |
|
|
344 |
while (my ($key, $value) = each %{ $cfg }) { |
|
345 |
next unless $value; |
|
346 |
|
|
347 |
my $info = $key_map{$key} || {}; |
|
348 |
$key = $info->{name} || $key; |
|
349 |
|
|
350 |
if ($info->{append_path}) { |
|
351 |
$value = ':' . $value unless $value =~ m/^:/ || !$ENV{$key}; |
|
352 |
$value = $ENV{$key} . $value; |
|
353 |
} |
|
354 |
|
|
355 |
$ENV{$key} = $value; |
|
356 |
} |
|
357 |
} |
|
358 |
|
|
337 | 359 |
package main; |
338 | 360 |
|
339 | 361 |
use strict; |
config/lx-erp.conf | ||
---|---|---|
23 | 23 |
# if you have latex installed set to 1 |
24 | 24 |
$latex_templates = 1; |
25 | 25 |
|
26 |
# if the server can't find gzip, latex, dvips or pdflatex, add the path |
|
27 |
$ENV{PATH} .= ":/usr/local/bin"; |
|
28 |
|
|
29 |
# on mac os X using Fink's Perl libs, add the path |
|
30 |
$ENV{PERL5LIB} .= ":/sw/lib/perl5"; |
|
31 |
|
|
32 | 26 |
# Aktivierung der verschiedenen Spezialmodule |
33 | 27 |
$webdav = 0; |
34 | 28 |
$lizenzen = 1; |
... | ... | |
63 | 57 |
$openofficeorg_daemon_port = 2002; |
64 | 58 |
|
65 | 59 |
# Pfad zum "X virtual frame buffer", unter dem OpenOffice gestartet wird. |
66 |
# Zusaetzlich muessen die Programme "xauth" und "mcookie" gefunden werden |
|
67 |
# koennen, was eine Aenderung an PATH bedeuten kann. |
|
68 |
$ENV{"PATH"} = $ENV{"PATH"} . ":/usr/X11R6/bin:/usr/X11/bin"; |
|
69 | 60 |
$xvfb_bin = "/usr/bin/Xvfb"; |
70 | 61 |
|
71 | 62 |
# Das charset, in dem die Daten in der Datenbank abgelegt sind. |
config/lx-erp.conf.default | ||
---|---|---|
23 | 23 |
# if you have latex installed set to 1 |
24 | 24 |
$latex_templates = 1; |
25 | 25 |
|
26 |
# if the server can't find gzip, latex, dvips or pdflatex, add the path |
|
27 |
$ENV{PATH} .= ":/usr/local/bin"; |
|
28 |
|
|
29 |
# on mac os X using Fink's Perl libs, add the path |
|
30 |
$ENV{PERL5LIB} .= ":/sw/lib/perl5"; |
|
31 |
|
|
32 | 26 |
# Aktivierung der verschiedenen Spezialmodule |
33 | 27 |
$webdav = 0; |
34 | 28 |
$lizenzen = 1; |
... | ... | |
63 | 57 |
$openofficeorg_daemon_port = 2002; |
64 | 58 |
|
65 | 59 |
# Pfad zum "X virtual frame buffer", unter dem OpenOffice gestartet wird. |
66 |
# Zusaetzlich muessen die Programme "xauth" und "mcookie" gefunden werden |
|
67 |
# koennen, was eine Aenderung an PATH bedeuten kann. |
|
68 |
$ENV{"PATH"} = $ENV{"PATH"} . ":/usr/X11R6/bin:/usr/X11/bin"; |
|
69 | 60 |
$xvfb_bin = "/usr/bin/Xvfb"; |
70 | 61 |
|
71 | 62 |
# Das charset, in dem die Daten in der Datenbank abgelegt sind. |
config/lx_office.conf.default | ||
---|---|---|
8 | 8 |
# Path to the old memberfile (ignored on new installations) |
9 | 9 |
memberfile = users/members |
10 | 10 |
|
11 |
[environment] |
|
12 |
# Add the following paths to the PATH environment variable. |
|
13 |
path = /usr/local/bin:/usr/X11R6/bin:/usr/X11/bin |
|
14 |
# Add the following paths to the PERL5LIB environment variable. |
|
15 |
# "/sw/lib/perl5" is for Mac OS X with Fink's Perl. |
|
16 |
lib = /sw/lib/perl5 |
|
17 |
|
|
11 | 18 |
[task_server] |
12 | 19 |
# User name to use for database access |
13 | 20 |
login = mb |
... | ... | |
96 | 103 |
keep_temp_files = 0 |
97 | 104 |
|
98 | 105 |
# The file name where the debug messages are written to. |
99 |
file_name = /tmp/lx-office-debug.log |
|
106 |
file_name = /tmp/mb-lxdebug.log |
Auch abrufbar als: Unified diff
Initialisierung von %ENV von lx-erp.conf nach lx_office.conf verschoben