This file is indexed.

postinst is in ganglia-webfrontend 3.6.1-1ubuntu1.

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
#!/bin/sh

set -e

. /usr/share/debconf/confmodule
db_version 2.0 || [ $? -lt 30 ]

chown -R www-data /var/lib/ganglia-web/dwoo/
if [ "$1" = "configure" ]; then

    db_get ganglia-webfrontend/webserver
    autoconfigure="$RET"
    webserver="apache2"

    if [ "$autoconfigure" = true ]; then
        test -x /usr/sbin/$webserver || continue

        # Auto-configure module dependencies
        a2enmod php || true
        a2enmod cgi || true

        HTTPD_ETC=/etc/$webserver
        HTTPD_CONF=$HTTPD_ETC/conf-available
        HTTPD_CONF_GANGLIA=$HTTPD_CONF/ganglia-webfrontend.conf
        if [ -d $HTTPD_ETC -a ! -f $HTTPD_CONF_GANGLIA -a ! -h $HTTPD_CONF_GANGLIA ]; then
            ln -s /etc/ganglia-webfrontend/apache.conf $HTTPD_CONF_GANGLIA
        fi

        a2enconf ganglia-webfrontend || true

        # Restart apache2 if requested
        db_get ganglia-webfrontend/restart
        if [ "$RET" = "true" ]; then
            if [ -x /usr/sbin/invoke-rc.d ]; then
                invoke-rc.d $webserver restart
            else
                /etc/init.d/$webserver restart
            fi
        fi

    fi

fi