diff options
Diffstat (limited to 'docker')
| -rw-r--r-- | docker/common/horizon/config-external.sh | 15 | ||||
| -rwxr-xr-x | docker/common/horizon/start.sh | 17 |
2 files changed, 28 insertions, 4 deletions
diff --git a/docker/common/horizon/config-external.sh b/docker/common/horizon/config-external.sh index 373a82e64..8e9fc47a0 100644 --- a/docker/common/horizon/config-external.sh +++ b/docker/common/horizon/config-external.sh @@ -8,3 +8,18 @@ if [[ -f "$SOURCE" ]]; then chown ${OWNER}: $TARGET chmod 0644 $TARGET fi + +if [[ "${KOLLA_BASE_DISTRO}" == "ubuntu" || \ + "${KOLLA_BASE_DISTRO}" == "debian" ]]; then + SOURCE="/opt/kolla/horizon/horizon.conf" + TARGET="/etc/apache2/sites-enabled/000-default.conf" +else + SOURCE="/opt/kolla/horizon/horizon.conf" + TARGET="/etc/httpd/sites.d/horizon.conf" +fi + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker/common/horizon/start.sh b/docker/common/horizon/start.sh index 2470bda77..096326a3a 100755 --- a/docker/common/horizon/start.sh +++ b/docker/common/horizon/start.sh @@ -2,12 +2,21 @@ set -o errexit -CMD="/usr/sbin/httpd" -ARGS="-DFOREGROUND" - -# Loading common functions. +# Loading common functions source /opt/kolla/kolla-common.sh +if [[ "${KOLLA_BASE_DISTRO}" == "ubuntu" || \ + "${KOLLA_BASE_DISTRO}" == "debian" ]]; then + CMD="/usr/sbin/apache2" + ARGS="-DFOREGROUND" + + # Loading Apache2 ENV variables + source /etc/apache2/envvars +else + CMD="/usr/sbin/httpd" + ARGS="-DFOREGROUND" +fi + # Execute config strategy set_configs |
