]> review.fuel-infra Code Review - openstack-build/horizon-build.git/commitdiff
Only does db_set if the defaults file is found.
authorThomas Goirand <thomas@goirand.fr>
Tue, 18 Jun 2013 08:38:22 +0000 (16:38 +0800)
committerThomas Goirand <thomas@goirand.fr>
Tue, 18 Jun 2013 08:38:22 +0000 (16:38 +0800)
Rewritten-From: bb6529d68d3debb6f0363d64b774e6d9747f7358

xenial/debian/openstack-dashboard-apache.config

index bee638ee651b15f995334f69031fceb1ba2de873..4174d9055a00f1049f8ca574c6631c1d4c4bd87a 100644 (file)
@@ -6,23 +6,26 @@ set -e
 
 if [ -r /etc/default/openstack-dashboard-apache ] ; then
        . /etc/default/openstack-dashboard-apache
-fi
 
-if [ "${HORIZON_ACTIVATE_VHOSTS}" = "true" ] || [ "${HORIZON_ACTIVATE_VHOSTS}" = "yes" ] ; then
-       db_set horizon/activate_vhost true
-else
-       db_set horizon/activate_vhost false
+       if [ "${HORIZON_ACTIVATE_VHOSTS}" = "true" ] || [ "${HORIZON_ACTIVATE_VHOSTS}" = "yes" ] ; then
+               db_set horizon/activate_vhost true
+       else
+               db_set horizon/activate_vhost false
+       fi
 fi
 
+
 db_input high horizon/activate_vhost || true
 db_go || true
 
 db_get horizon/activate_vhost
 if [ "${RET}" = "true" ] ; then
-       if [ "${HORIZON_USE_SSL}" = "true" ] || [ "${HORIZON_USE_SSL}" = "yes" ] ; then
-               db_set horizon/use_ssl true
-       else
-               db_set horizon/use_ssl false
+       if [ -r /etc/default/openstack-dashboard-apache ] ; then
+               if [ "${HORIZON_USE_SSL}" = "true" ] || [ "${HORIZON_USE_SSL}" = "yes" ] ; then
+                       db_set horizon/use_ssl true
+               else
+                       db_set horizon/use_ssl false
+               fi
        fi
 
        db_input high horizon/use_ssl || true