X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=rewrite-config.PL;h=9009eb57867ce0cd4b59b9dac8b9e53e45ccb126;hb=6b24ddf91c74676ab4adca21b6cf2cc8402f448e;hp=69b070a687208b505181173ec2daf70dd541305a;hpb=2fafa1424b8d4d31d68a2868bd237541c870a4ed;p=koha-ffzg.git diff --git a/rewrite-config.PL b/rewrite-config.PL index 69b070a687..9009eb5786 100644 --- a/rewrite-config.PL +++ b/rewrite-config.PL @@ -60,11 +60,21 @@ also need to override WEBSERVER_IP. =cut -$myhost = hostname(); -$mydomain = $myhost; -$mydomain =~ s/^.*?\.//; -# This is set here to rescue systems with broken DNS -$myip = $ENV{'WEBSERVER_IP'} || inet_ntoa(scalar gethostbyname($myhost||'localhost')) || die "Cannot get our own IP address: DNS fault?"; +if ( $myhost = $ENV{WEBSERVER_HOST} || hostname ) { + ( $mydomain = $myhost ) =~ s/.*?\.//; +} else { + $myhost = 'localhost'; + $mydomain = 'localdomain'; +} + +unless ( $myip = $ENV{WEBSERVER_IP} ) { + my $byname = gethostbyname( $myhost ) + or die "Could not get the IP address of $myhost, DNS fault? ($!)"; + $myip = inet_ntoa $byname + or die "can't inet_ntoa ($!)"; +} + + $prefix = $ENV{'INSTALL_BASE'} || "/usr"; # These are our configuration guesses @@ -127,6 +137,8 @@ $prefix = $ENV{'INSTALL_BASE'} || "/usr"; "__AUTH_INDEX_MODE__" => 'grs1', "__RUN_DATABASE_TESTS__" => 'no', "__PATH_TO_ZEBRA__" => "", + "__MEMCACHED_SERVERS__" => "", + "__MEMCACHED_NAMESPACE__" => "", ); # Override configuration from the environment @@ -182,4 +194,3 @@ Makefile.PL, ExtUtils::MakeMaker(3) MJ Ray mjr at phonecoop.coop =cut -