This file is indexed.

postinst is in python-murano-dashboard 1:2.0.0-1.

This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/sh

set -e

if [ "$1" = "configure" ] ; then
	# (tlbr) Run of collectstatic is required but do not run it until easy switch for
	# for Horizon package will be implemented.
	#/usr/share/openstack-dashboard/manage.py collectstatic --clear --noinput

	# Compress the JS and CSS with python-compressor and python-lesscpy
	/usr/share/openstack-dashboard/manage.py compress --force

	if [ -f /var/lib/openstack-dashboard/secret-key/.secret_key_store ]; then
		rm /var/lib/openstack-dashboard/secret-key/.secret_key_store
	fi

	if [ -d /var/lib/openstack-dashboard/secret-key ]; then
		chown -R www-data /var/lib/openstack-dashboard/secret-key
	fi

	if [ -d /var/lib/openstack-dashboard/static ]; then
		chown -R www-data /var/lib/openstack-dashboard/static
	fi

	DSHB_SETTINGS_LOC='/etc/openstack-dashboard/local_settings.py'
	if [ -f "$DSHB_SETTINGS_LOC" ]; then
		mkdir -p /var/cache/murano-dashboard
		chown -R horizon:www-data /var/cache/murano-dashboard
		chmod 775 /var/cache/murano-dashboard

		if grep -Eq '^METADATA_CACHE_DIR=' $DSHB_SETTINGS_LOC; then
			sed -i '/^METADATA_CACHE_DIR=/{s#.*#METADATA_CACHE_DIR="/var/cache/murano-dashboard"#}' $DSHB_SETTINGS_LOC
		else
			sed -i '$aMETADATA_CACHE_DIR="/var/cache/murano-dashboard"' $DSHB_SETTINGS_LOC
		fi
	fi

	if [ -x /etc/init.d/apache2 ]; then
		invoke-rc.d --quiet apache2 reload
	fi
fi


# Automatically added by dhpython:
if which pycompile >/dev/null 2>&1; then
	pycompile -p python-murano-dashboard 
fi

# End automatically added section


exit 0