From afda4efb2c9d69795ecaf1da10322fec67cac093 Mon Sep 17 00:00:00 2001 From: Attila Fazekas Date: Tue, 3 Jun 2014 16:53:03 +0200 Subject: [PATCH] Enable horizon on Fedoras The previous apache/horizon a688bc65104e7d8998ffdb321d67a9f33df6997e change left horizon disabled on Fedora. Closes-Bug: #1326126 Change-Id: I79f84bb63471f84c6b37538e8dfe2bcca3ce3eac --- lib/horizon | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/lib/horizon b/lib/horizon index 9e4f2f95c8..632c7ab767 100644 --- a/lib/horizon +++ b/lib/horizon @@ -123,21 +123,6 @@ function init_horizon { fi local horizon_conf=$(apache_site_config_for horizon) - if is_ubuntu; then - disable_apache_site 000-default - sudo touch $horizon_conf - enable_apache_site horizon - elif is_fedora; then - sudo sed '/^Listen/s/^.*$/Listen 0.0.0.0:80/' -i /etc/httpd/conf/httpd.conf - elif is_suse; then - : # nothing to do - else - exit_distro_not_supported "horizon apache configuration" - fi - - # Remove old log files that could mess with how devstack detects whether Horizon - # has been successfully started (see start_horizon() and functions::screen_it()) - sudo rm -f /var/log/$APACHE_NAME/horizon_* # Configure apache to run horizon sudo sh -c "sed -e \" @@ -148,6 +133,23 @@ function init_horizon { s,%DEST%,$DEST,g; s,%HORIZON_REQUIRE%,$HORIZON_REQUIRE,g; \" $FILES/apache-horizon.template >$horizon_conf" + + if is_ubuntu; then + disable_apache_site 000-default + sudo touch $horizon_conf + elif is_fedora; then + sudo sed '/^Listen/s/^.*$/Listen 0.0.0.0:80/' -i /etc/httpd/conf/httpd.conf + elif is_suse; then + : # nothing to do + else + exit_distro_not_supported "horizon apache configuration" + fi + enable_apache_site horizon + + # Remove old log files that could mess with how devstack detects whether Horizon + # has been successfully started (see start_horizon() and functions::screen_it()) + sudo rm -f /var/log/$APACHE_NAME/horizon_* + } # install_horizon() - Collect source and prepare