aboutsummaryrefslogtreecommitdiff
path: root/docker
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2015-08-25 06:18:55 +0000
committerGerrit Code Review <review@openstack.org>2015-08-25 06:18:55 +0000
commitf07f4387233f014c05edfe21ae7ab3ef298a1512 (patch)
treeb7d5ea0506a005b4f5dab7a12dea9b378024b092 /docker
parentf875586ebb83ee272ee1480593e81cde875fcc4c (diff)
parent6a297265c5b1a3fa6ef134e8953ea5c1bbfdca02 (diff)
downloadkolla-f07f4387233f014c05edfe21ae7ab3ef298a1512.tar.gz
kolla-f07f4387233f014c05edfe21ae7ab3ef298a1512.zip
Merge "Ubuntu - Horizon"
Diffstat (limited to 'docker')
-rw-r--r--docker/common/horizon/config-external.sh15
-rwxr-xr-xdocker/common/horizon/start.sh17
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