read_config 'config/lx_office.conf' => %::lx_office_conf;
_decode_recursively(\%::lx_office_conf);
+ _init_environment();
eval {
package main;
}
}
+sub _init_environment {
+ my %key_map = ( lib => { name => 'PERL5LIB', append_path => 1 },
+ path => { name => 'PATH', append_path => 1 },
+ );
+ my $cfg = $::lx_office_conf{environment} || {};
+
+ while (my ($key, $value) = each %{ $cfg }) {
+ next unless $value;
+
+ my $info = $key_map{$key} || {};
+ $key = $info->{name} || $key;
+
+ if ($info->{append_path}) {
+ $value = ':' . $value unless $value =~ m/^:/ || !$ENV{$key};
+ $value = $ENV{$key} . $value;
+ }
+
+ $ENV{$key} = $value;
+ }
+}
+
package main;
use strict;
# if you have latex installed set to 1
$latex_templates = 1;
-# if the server can't find gzip, latex, dvips or pdflatex, add the path
-$ENV{PATH} .= ":/usr/local/bin";
-
-# on mac os X using Fink's Perl libs, add the path
-$ENV{PERL5LIB} .= ":/sw/lib/perl5";
-
# Aktivierung der verschiedenen Spezialmodule
$webdav = 0;
$lizenzen = 1;
$openofficeorg_daemon_port = 2002;
# Pfad zum "X virtual frame buffer", unter dem OpenOffice gestartet wird.
-# Zusaetzlich muessen die Programme "xauth" und "mcookie" gefunden werden
-# koennen, was eine Aenderung an PATH bedeuten kann.
-$ENV{"PATH"} = $ENV{"PATH"} . ":/usr/X11R6/bin:/usr/X11/bin";
$xvfb_bin = "/usr/bin/Xvfb";
# Das charset, in dem die Daten in der Datenbank abgelegt sind.
# if you have latex installed set to 1
$latex_templates = 1;
-# if the server can't find gzip, latex, dvips or pdflatex, add the path
-$ENV{PATH} .= ":/usr/local/bin";
-
-# on mac os X using Fink's Perl libs, add the path
-$ENV{PERL5LIB} .= ":/sw/lib/perl5";
-
# Aktivierung der verschiedenen Spezialmodule
$webdav = 0;
$lizenzen = 1;
$openofficeorg_daemon_port = 2002;
# Pfad zum "X virtual frame buffer", unter dem OpenOffice gestartet wird.
-# Zusaetzlich muessen die Programme "xauth" und "mcookie" gefunden werden
-# koennen, was eine Aenderung an PATH bedeuten kann.
-$ENV{"PATH"} = $ENV{"PATH"} . ":/usr/X11R6/bin:/usr/X11/bin";
$xvfb_bin = "/usr/bin/Xvfb";
# Das charset, in dem die Daten in der Datenbank abgelegt sind.
# Path to the old memberfile (ignored on new installations)
memberfile = users/members
+[environment]
+# Add the following paths to the PATH environment variable.
+path = /usr/local/bin:/usr/X11R6/bin:/usr/X11/bin
+# Add the following paths to the PERL5LIB environment variable.
+# "/sw/lib/perl5" is for Mac OS X with Fink's Perl.
+lib = /sw/lib/perl5
+
[task_server]
# User name to use for database access
login = mb
keep_temp_files = 0
# The file name where the debug messages are written to.
-file_name = /tmp/lx-office-debug.log
+file_name = /tmp/mb-lxdebug.log