@@ -, +, @@
---
debian/templates/koha-conf-site.xml.in | 2 +-
etc/koha-conf.xml | 2 +-
rewrite-config.PL | 8 +++++---
3 files changed, 7 insertions(+), 5 deletions(-)
--- a/debian/templates/koha-conf-site.xml.in
+++ a/debian/templates/koha-conf-site.xml.in
@@ -253,7 +253,7 @@ __END_SRU_PUBLICSERVER__
__DB_HOST__
- __DB_HOST__
+ __WEBSERVER_HOST__
3306
__DB_USER__
__DB_PASS__
--- a/etc/koha-conf.xml
+++ a/etc/koha-conf.xml
@@ -81,7 +81,7 @@ __PAZPAR2_TOGGLE_XML_POST__
__DB_HOST__
- __DB_HOST__
+ __WEBSERVER_HOST__
__DB_PORT__
__DB_USER__
__DB_PASS__
--- a/rewrite-config.PL
+++ a/rewrite-config.PL
@@ -49,13 +49,14 @@ WEBSERVER_HOST, WEBSERVER_IP, WEBSERVER_PORT, WEBSERVER_PORT_LIBRARIAN, ZEBRA_PA
=head1 EXAMPLES
-To override the guessed hostname and email address, run:
+To override the guessed hostnames and email address, run:
+ DB_HOST=mysecrethostname.com.invalid \
WEBSERVER_HOST=mysecrethostname.com.invalid \
WEBMASTER_EMAIL=webmaster@publichost.com make install
Note that if WEBSERVER_HOST does not resolve to an IP address, you will
-also need to override WEBSERVER_IP.
+also need to override WEBSERVER_IP. DB_HOST defaults to the WEBSERVER_HOST value.
=cut
@@ -73,6 +74,7 @@ unless ( $myip = $ENV{WEBSERVER_IP} ) {
or die "can't inet_ntoa ($!)";
}
+$mydbhost = $ENV{DB_HOST} || $myhost;
$prefix = $ENV{'INSTALL_BASE'} || "/usr";
@@ -85,7 +87,7 @@ $prefix = $ENV{'INSTALL_BASE'} || "/usr";
"__PLUGINS_DIR__" => "/var/lib/koha/plugins",
"__DB_TYPE__" => "mysql",
"__DB_NAME__" => "koha",
- "__DB_HOST__" => $myhost,
+ "__DB_HOST__" => $mydbhost,
"__DB_PORT__" => "3306",
"__DB_USER__" => "kohaadmin",
"__DB_PASS__" => "katikoan",
--