This file is indexed.

postrm is in puppet-master-passenger 5.4.0-2ubuntu3.

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

set -e

sitename="puppet-master"

# Can be removed when we only support apache >= 2.4
restart_apache2() {
    if [ -x "/etc/init.d/apache2" ]; then
        # Seems that a restart is needed. reload breaks ssl apparently.
        if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
            invoke-rc.d apache2 restart || exit $?
        else
            /etc/init.d/apache2 restart || exit $?
        fi
    fi
}

case "$1" in
    purge)
	if dpkg-statoverride --list /usr/share/puppet/rack/puppet-master/config.ru >/dev/null 2>&1
	then
	    dpkg-statoverride --remove /usr/share/puppet/rack/puppet-master/config.ru
	fi
	# Remove the puppet master site configuration on purge
	rm -f /etc/apache2/sites-available/${sitename}.conf
	;;
    remove)
        # Disable the puppet master apache2 site configuration on package removal
        if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
            . /usr/share/apache2/apache2-maintscript-helper
            apache2_invoke dissite "${sitename}"
        else
            a2dissite puppet-master
            restart_apache2
        fi
	;;
    upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
        ;;
    *)
        echo "postrm called with unknown argument \`$1'" >&2
        exit 1

esac



exit 0