* d/control: Add python-xstatic-magic-search dependency.
Move memcached and openstack-dashboard-apache to Suggests field.
* d/openstack-dashboard-apache.postinst:
- - Remove /usr/share/openstack-dashboard/static directory and create a link
- to /var/lib/openstack-dashboard/static directory to make it compatible with
- Ubuntu OpenStack Puppet manifests.
- Delete the .secret_ket_store file if exists.
- Make www-data the owner of /var/lib/openstack-dashboard/secret-key and
/var/lib/openstack-dashboard/static directories.
- Set new alias to Horizon static files.
- Call collectstatic with --clear and --noinput options.
+ * d/openstack-dashboard.{preinst,postinst,postrm},
+ openstack-dashboard-apache.{preinst,postinst,postrm}:
+ - Remove /usr/share/openstack-dashboard/static directory and create a link
+ to /var/lib/openstack-dashboard/static directory to make it compatible with
+ Ubuntu OpenStack Puppet manifests.
* d/rules: Do not copy/create additional files/links with/to static files.
* d/openstack-dashboard.links: Remove all links except a link to /usr/bin/lessc binary.
* d/debian/apache-sites-available/*.conf:
set -e
+
+dpkg-maintscript-helper dir_to_symlink \
+ /usr/share/openstack-dashboard/static /var/lib/openstack-dashboard/static -- "$@"
+
if [ "$1" = "configure" ] ; then
. /usr/share/debconf/confmodule
if ! [ -f /etc/default/openstack-dashboard-apache ] ; then
a2dissite openstack-dashboard-alias-only.conf
a2ensite openstack-dashboard.conf
fi
- if [ -d '/usr/share/openstack-dashboard/static' ] ; then
- rm -rf /usr/share/openstack-dashboard/static
- fi
- ln -s /var/lib/openstack-dashboard/static /usr/share/openstack-dashboard/static
/usr/share/openstack-dashboard/manage.py collectstatic --clear --noinput
/usr/share/openstack-dashboard/manage.py compress --force
if [ -f '/var/lib/openstack-dashboard/secret-key/.secret_key_store' ]; then
a2dissite openstack-dashboard-ssl-redirect.conf
a2dissite openstack-dashboard-ssl.conf
a2dissite openstack-dashboard-alias-only.conf
- if [ -d '/usr/share/openstack-dashboard/static' ] ; then
- rm -rf /usr/share/openstack-dashboard/static
- fi
- ln -s /var/lib/openstack-dashboard/static /usr/share/openstack-dashboard/static
/usr/share/openstack-dashboard/manage.py collectstatic --clear --noinput
/usr/share/openstack-dashboard/manage.py compress --force
if [ -f /var/lib/openstack-dashboard/secret-key/.secret_key_store ]; then
set -e
+dpkg-maintscript-helper dir_to_symlink \
+ /usr/share/openstack-dashboard/static /var/lib/openstack-dashboard/static -- "$@"
+
if [ "${1}" = "purge" ] ; then
if [ -f /etc/default/openstack-dashboard-apache ] ; then
rm -rf /etc/default/openstack-dashboard-apache
--- /dev/null
+#!/bin/sh
+
+set -e
+
+dpkg-maintscript-helper dir_to_symlink \
+ /usr/share/openstack-dashboard/static /var/lib/openstack-dashboard/static -- "$@"
+
+#DEBHELPER#
set -e
+dpkg-maintscript-helper dir_to_symlink \
+ /usr/share/openstack-dashboard/static /var/lib/openstack-dashboard/static -- "$@"
+
if [ "$1" = "configure" ] ; then
adduser --system \
--home /var/lib/horizon \
cp /usr/share/openstack-dashboard/local_settings.py /etc/openstack-dashboard/local_settings.py
fi
- if [ -d '/usr/share/openstack-dashboard/static' ] ; then
- rm -rf /usr/share/openstack-dashboard/static
- fi
- ln -s /var/lib/openstack-dashboard/static /usr/share/openstack-dashboard/static
-
# Compress the JS and CSS with python-compressor and python-lesscpy
/usr/share/openstack-dashboard/manage.py collectstatic --clear --noinput
/usr/share/openstack-dashboard/manage.py compress --force
set -e
+dpkg-maintscript-helper dir_to_symlink \
+ /usr/share/openstack-dashboard/static /var/lib/openstack-dashboard/static -- "$@"
+
if [ "${1}" = "purge" ] ; then
rm -f /etc/openstack-dashboard/local_settings.py
rmdir --ignore-fail-on-non-empty /etc/openstack-dashboard || true
--- /dev/null
+#!/bin/sh
+
+set -e
+
+dpkg-maintscript-helper dir_to_symlink \
+ /usr/share/openstack-dashboard/static /var/lib/openstack-dashboard/static -- "$@"
+
+#DEBHELPER#