Only does db_set if the defaults file is found.

This commit is contained in:
Thomas Goirand 2013-06-18 16:38:22 +08:00
parent 61eb48465b
commit bb6529d68d
1 changed files with 12 additions and 9 deletions

View File

@ -6,23 +6,26 @@ set -e
if [ -r /etc/default/openstack-dashboard-apache ] ; then
. /etc/default/openstack-dashboard-apache
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
if [ "${HORIZON_ACTIVATE_VHOSTS}" = "true" ] || [ "${HORIZON_ACTIVATE_VHOSTS}" = "yes" ] ; then
db_set horizon/activate_vhost true
else
db_set horizon/activate_vhost false
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