4
# dh_installdeb will replace this with shell code automatically
5
# generated by other debhelper scripts.
8
# Source debconf library
9
if [ -f /usr/share/debconf/confmodule ]; then
10
. /usr/share/debconf/confmodule
13
# Check that lava-server is installed
14
if [ ! -f /var/lib/dpkg/info/lava-server.config ]; then
18
# Check that django-debian in installed
19
if [ ! -f /usr/share/django-debian/dpkg/postinst ]; then
23
# Read django-debian configuration variables from the lava-server.config file
24
# This is highly hacky but we don't have a better interface yet. Ultimately
25
# we'd like to query the actual settings from some django-debian helper.
26
# Currently there is no customizability so we can assume that the initial
27
# settings fused in the config script are correct.
29
grep -e 'django_debian_.*=".*"' /var/lib/dpkg/info/lava-server.config > $META_DATA
33
# Source the django-debian postinst script and pretend to be lava server.
35
# NOTE: This is not an accident. Removing or installing an extension have
36
# identical consequences to the master application. We need to rebuild static
37
# files and reconfigure the web server. Here we do a bit too much (database
38
# migration is not needed as the database is simply not touched by this step)
39
# but it should be harmless
40
. /usr/share/django-debian/dpkg/postinst
41
_django_debian_config lava-server "$@"
42
_django_debian_debug "removing lava-server extension: lava-dashboard"
43
_django_debian_configure_web_app
44
_django_debian_configure_web_server_postinst