|
...
|
...
|
@@ -50,7 +50,7 @@ function _horizon_config_set {
|
|
50
|
50
|
sed -e "/^$option/d" -i $local_settings
|
|
51
|
51
|
echo -e "\n$option=$value" >> $file
|
|
52
|
52
|
elif grep -q "^$section" $file; then
|
|
53
|
|
- line=$(sed -ne "/^$section/,/^}/ { /^ *'$option':/ p; }" $file)
|
|
|
53
|
+ local line=$(sed -ne "/^$section/,/^}/ { /^ *'$option':/ p; }" $file)
|
|
54
|
54
|
if [ -n "$line" ]; then
|
|
55
|
55
|
sed -i -e "/^$section/,/^}/ s/^\( *'$option'\) *:.*$/\1: $value,/" $file
|
|
56
|
56
|
else
|
|
...
|
...
|
@@ -89,7 +89,7 @@ function configure_horizon {
|
|
89
|
89
|
# init_horizon() - Initialize databases, etc.
|
|
90
|
90
|
function init_horizon {
|
|
91
|
91
|
# ``local_settings.py`` is used to override horizon default settings.
|
|
92
|
|
- local_settings=$HORIZON_DIR/openstack_dashboard/local/local_settings.py
|
|
|
92
|
+ local local_settings=$HORIZON_DIR/openstack_dashboard/local/local_settings.py
|
|
93
|
93
|
cp $HORIZON_SETTINGS $local_settings
|
|
94
|
94
|
|
|
95
|
95
|
if is_service_enabled neutron; then
|
|
...
|
...
|
@@ -121,9 +121,9 @@ function init_horizon {
|
|
121
|
121
|
sudo mkdir -p $HORIZON_DIR/.blackhole
|
|
122
|
122
|
|
|
123
|
123
|
# Apache 2.4 uses mod_authz_host for access control now (instead of "Allow")
|
|
124
|
|
- HORIZON_REQUIRE=''
|
|
|
124
|
+ local horizon_require=''
|
|
125
|
125
|
if check_apache_version "2.4" ; then
|
|
126
|
|
- HORIZON_REQUIRE='Require all granted'
|
|
|
126
|
+ horizon_require='Require all granted'
|
|
127
|
127
|
fi
|
|
128
|
128
|
|
|
129
|
129
|
local horizon_conf=$(apache_site_config_for horizon)
|
|
...
|
...
|
@@ -135,7 +135,7 @@ function init_horizon {
|
|
135
|
135
|
s,%HORIZON_DIR%,$HORIZON_DIR,g;
|
|
136
|
136
|
s,%APACHE_NAME%,$APACHE_NAME,g;
|
|
137
|
137
|
s,%DEST%,$DEST,g;
|
|
138
|
|
- s,%HORIZON_REQUIRE%,$HORIZON_REQUIRE,g;
|
|
|
138
|
+ s,%HORIZON_REQUIRE%,$horizon_require,g;
|
|
139
|
139
|
\" $FILES/apache-horizon.template >$horizon_conf"
|
|
140
|
140
|
|
|
141
|
141
|
if is_ubuntu; then
|