This file is indexed.

postrm is in nagvis 1:1.7.10+dfsg1-2.

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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#!/bin/sh
# postrm script for nagvis
#
# see: dh_installdeb(1)

set -e

# summary of how this script can be called:
#        * <postrm> `remove'
#        * <postrm> `purge'
#        * <old-postrm> `upgrade' <new-version>
#        * <new-postrm> `failed-upgrade' <old-version>
#        * <new-postrm> `abort-install'
#        * <new-postrm> `abort-install' <old-version>
#        * <new-postrm> `abort-upgrade' <old-version>
#        * <disappearer's-postrm> `disappear' <overwriter>
#          <overwriter-version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package

# move /etc/apache2/conf.d/nagvis.conf to /etc/nagvis/apache2.conf
dpkg-maintscript-helper mv_conffile \
    /etc/apache2/conf.d/nagvis.conf /etc/nagvis/apache2.conf "1:1.7.9+dfsg1-1~" nagvis -- "$@"

# remove old automap
dpkg-maintscript-helper rm_conffile \
    /etc/nagvis/automaps/__automap.cfg "1:1.7.9+dfsg1-1~" nagvis -- "$@"

# Apache2
if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
    . /usr/share/apache2/apache2-maintscript-helper
    apache2_invoke disconf nagvis
fi
if [ -L /etc/apache2/conf.d/nagvis.conf ]; then
    # remove link to config
    rm -f /etc/apache2/conf.d/nagvis.conf
    # reload webserver
    [ -x $(which invoke-rc.d) ] && invoke-rc.d apache2 reload || true
fi

case "$1" in
    purge)
        ## remove apache part of the configuration and nagvis' ini file
        ## (both generetaded in postinst)
        for conf_file in /etc/apache2/conf.d/nagvis.conf /etc/nagvis/apache2.conf /etc/nagvis/nagvis.ini.php ; do
            rm -f "$conf_file"
            if which ucf >/dev/null; then
                ucf --purge "$conf_file"
            fi    
            if which ucfr >/dev/null; then
                ucfr --purge nagvis "$conf_file"
            fi
        done
        ## these files are generated by user interaction, ask if they should be removed
        delete_on_purge="false"
        if [ -f /usr/share/debconf/confmodule ]; then
            . /usr/share/debconf/confmodule
            db_input high nagvis/delete_on_purge || true
            db_go || true
            db_get nagvis/delete_on_purge || true
            delete_on_purge="$RET"
        fi
        if [ "$delete_on_purge" = "true" ]; then
            rm -f /etc/nagvis/auth.db
            rm -rf /etc/nagvis/automaps/*
            rm -rf /etc/nagvis/maps/*
            rm -rf /etc/nagvis/profiles/*
            rm -rf /var/cache/nagvis/*
            rm -rf /var/lib/nagvis/*
        fi
    ;;
    remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
    ;;

    *)
        echo "postrm called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

# Automatically added by dh_installdebconf
if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then
	. /usr/share/debconf/confmodule
	db_purge
fi
# End automatically added section


exit 0