This file is indexed.

postinst is in openstack-dashboard 1:2014.1.5-0ubuntu2.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/bin/sh
# vim: set ts=2 et:

set -e

CONF="openstack-dashboard.conf"

if [ "$1" = "configure" ]; then
  # /etc/apache2/conf.d/dashboard.conf -> /etc/apache2/conf-available/openstack-dashboard.conf
  dpkg-maintscript-helper mv_conffile \
    /etc/apache2/conf.d/dashboard.conf /etc/apache2/conf-available/$CONF \
    2012.1~rc1-0ubuntu1 -- "$@"

  # Transition config to apache 2.4 compatable location.
  dpkg-maintscript-helper mv_conffile \
    /etc/apache2/conf.d/$CONF \
    /etc/apache2/conf-available/$CONF \
    1:2013.2~b2-0ubuntu3 -- "$@"

	if ! getent group horizon > /dev/null 2>&1
	then
		addgroup --system horizon >/dev/null
	fi
	if ! getent passwd horizon > /dev/null 2>&1
	then
    adduser --system --home /usr/share/openstack-dashboard/ --ingroup horizon \
            --no-create-home --shell /bin/false horizon
	fi

  if [ -e /usr/share/openstack-dashboard/openstack_dashboard/static ] ; then
    chown -R horizon:horizon \
      /usr/share/openstack-dashboard/openstack_dashboard/static
  fi

  if [ -d /etc/openstack-dashboard/ ] ; then
    chown horizon:horizon /etc/openstack-dashboard/
  fi

  A22_STATE=$(dpkg-query -f '${Status}' -W 'apache2.2-common' 2>/dev/null | awk '{print $3}' || true)

  if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
    # apache 2.4
    . /usr/share/apache2/apache2-maintscript-helper
    apache2_invoke enconf $CONF || exit $?
  elif [ "$A22_STATE" = "installed" ] || [ "$A22_STATE" = "unpacked" ] ; then
    # apache 2.2
    [ -d /etc/apache2/conf.d/ ] && [ ! -L /etc/apache2/conf.d/$CONF ] &&
      ln -s ../conf-available/$CONF /etc/apache2/conf.d/$CONF
    [ -x /etc/init.d/apache2 ] && invoke-rc.d --quiet apache2 reload
  fi

  if [ -d /var/lib/openstack-dashboard ] ; then
    # Generated secret storage for single node use - see local_settings.py
    # for more details of SECRET_KEY
    chmod 0700 /var/lib/openstack-dashboard
    if [ -f /etc/openstack-dashboard/secret_key ]; then
      mv /etc/openstack-dashboard/secret_key /var/lib/openstack-dashboard
    fi
    chown -R horizon:horizon /var/lib/openstack-dashboard
  fi
fi


# Automatically added by dh_python2:
if which pycompile >/dev/null 2>&1; then
	pycompile -p openstack-dashboard /usr/share/openstack-dashboard
fi

# End automatically added section