From 14a7f93b94cbb3a1841ba7f682d96496d514e1fe Mon Sep 17 00:00:00 2001 From: Leo <57889616+ThisIsTenou@users.noreply.github.com> Date: Mon, 4 Jan 2021 19:15:10 +0100 Subject: [PATCH] Use environment variable to determine hostname Since the hostname might not be noted inside the currently used /etc/hostname file (for whatever reason), the designated environment variable should be used. Otherwise, the apache config will contain a wrong or even empty ServerName, causing the setup to fail. --- idoit-install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/idoit-install b/idoit-install index 6f820e3..d04c86a 100755 --- a/idoit-install +++ b/idoit-install @@ -1108,7 +1108,7 @@ function configureApache { log "Configure Apache Web server" - hostname="$(cat /etc/hostname)" + hostname="$HOSTNAME" case "$OS" in "rhel7"|"rhel8"|"centos7"|"centos8")