X-Git-Url: http://git.equinoxoli.org/?p=koha-equinox.git;a=blobdiff_plain;f=rewrite-config.PL;h=8b886847f3de44536b043b37c00b9671115c59b4;hp=3047f8d2f651398799daf0c626ea09efeea0d884;hb=HEAD;hpb=b168f4a2e9a03ed56ce857353d4dde940980caba diff --git a/rewrite-config.PL b/rewrite-config.PL index 3047f8d..8479e12 100644 --- a/rewrite-config.PL +++ b/rewrite-config.PL @@ -60,6 +60,8 @@ also need to override WEBSERVER_IP. =cut +my $myhost; +my $mydomain; if ( $myhost = $ENV{WEBSERVER_HOST} || hostname ) { ( $mydomain = $myhost ) =~ s/.*?\.//; } else { @@ -67,6 +69,7 @@ if ( $myhost = $ENV{WEBSERVER_HOST} || hostname ) { $mydomain = 'localdomain'; } +my $myip; unless ( $myip = $ENV{WEBSERVER_IP} ) { my $byname = gethostbyname( $myhost ) or die "Could not get the IP address of $myhost, DNS fault? ($!)"; @@ -75,12 +78,12 @@ unless ( $myip = $ENV{WEBSERVER_IP} ) { } -$prefix = $ENV{'INSTALL_BASE'} || "/usr"; +my $prefix = $ENV{'INSTALL_BASE'} || "/usr"; # These are our configuration guesses # Keys were extracted by # "",/' -%configuration = ( +my %configuration = ( "__KOHA_INSTALLED_VERSION__" => "no_version_found", "__LOG_DIR__" => "/var/log", "__PLUGINS_DIR__" => "/var/lib/koha/plugins", @@ -154,7 +157,7 @@ $prefix = $ENV{'INSTALL_BASE'} || "/usr"; "__USE_ELASTICSEARCH__" => 'no', "__ELASTICSEARCH_SERVERS__" => "localhost:9200", "__ELASTICSEARCH_INDEX__" => "koha", - "__FONT_DIR__" => "/usr/share/fonts/truetype/ttf-dejavu", + "__FONT_DIR__" => "/usr/share/fonts/truetype/dejavu", "__TEMPLATE_CACHE_DIR__" => "/tmp/koha" ); @@ -172,8 +175,8 @@ if ($configuration{'__INSTALL_PAZPAR2__'} eq 'yes') { $configuration{'__PAZPAR2_TOGGLE_XML_POST__'} = ''; } -$fname = $ARGV[0]; -$file = &read_file($fname); +my $fname = $ARGV[0]; +my $file = &read_file($fname); $file =~ s/__.*?__/exists $configuration{$&} ? $configuration{$&} : $&/seg; # At this point, file is in 'blib' and by default