training-guides/labs/scripts/setup_horizon.sh
Roger Luethi b1cdd3679a labs: set errexit and no nounset for client scripts
Use bash options to have client scripts exit with an error if any
command returns an error (errexit) or if an unset variable is used
(nounset).

Fix those scripts that would otherwise fail due to this change.

Change-Id: I23336bcb5227e884eaf6dd6e9eb5cb0fc24977cc
2014-09-29 08:15:28 +02:00

23 lines
659 B
Bash
Executable File

#!/usr/bin/env bash
set -o errexit -o nounset
TOP_DIR=$(cd $(dirname "$0")/.. && pwd)
source "$TOP_DIR/config/paths"
source "$LIB_DIR/functions.guest"
exec_logfile
indicate_current_auto
#------------------------------------------------------------------------------
# Set up OpenStack Dashboard (horizon).
#------------------------------------------------------------------------------
echo "Installing horizon."
sudo apt-get install -y openstack-dashboard memcached
echo "Purging Ubuntu theme."
sudo dpkg --purge openstack-dashboard-ubuntu-theme
echo "Reloading apache and memcached service."
sudo service apache2 restart
sudo service memcached restart