tripleo-image-elements/elements/horizon/os-refresh-config/post-configure.d/14-horizon

20 lines
695 B
Bash
Executable File

#!/bin/bash
set -e
if [ -n "${HORIZON_VENV_DIR:-}" ] ; then
cp /etc/horizon/local_settings.py $HORIZON_VENV_DIR/lib/python2.7/site-packages/openstack_dashboard/local/local_settings.py
# TODO(shadower) workaround for:
# https://bugs.launchpad.net/os-apply-config/+bug/1246266
chmod 600 /etc/horizon/.secret_key_store
chown horizon:horizon /etc/horizon/.secret_key_store
# Precompile the Horizon assets. Can't do it in install.d because it depends on
# the local_settings.py config file.
source $HORIZON_VENV_DIR/bin/activate
DJANGO_SETTINGS_MODULE=openstack_dashboard.settings django-admin.py compress
fi
os-svc-enable -n apache2
os-svc-restart -n apache2