Add support for enabling/disabling the Ubuntu theme

This commit is contained in:
James Page
2013-04-08 17:17:03 +01:00
3 changed files with 11 additions and 1 deletions

View File

@@ -74,3 +74,7 @@ options:
type: string
default: "no"
description: Show Django debug messages.
ubuntu-theme:
type: string
default: "yes"
description: Use Ubuntu theme for the dashboard.

View File

@@ -3,7 +3,7 @@
CHARM="openstack-dashboard"
PACKAGES="openstack-dashboard openstack-dashboard-ubuntu-theme python-keystoneclient python-memcache memcached haproxy"
PACKAGES="openstack-dashboard python-keystoneclient python-memcache memcached haproxy"
LOCAL_SETTINGS="/etc/openstack-dashboard/local_settings.py"
if [[ -e "$CHARM_DIR/lib/openstack-common" ]] ; then

View File

@@ -121,6 +121,12 @@ function config_changed {
set_or_update DEBUG True
fi
if [ "$(config-get ubuntu-theme)" != "yes" ]; then
apt-get -y purge openstack-dashboard-ubuntu-theme || :
else
apt-get -y install openstack-dashboard-ubuntu-theme
fi
# Reconfigure Apache Ports
configure_apache "80:70" "443:433"
service apache2 restart