This file is indexed.

prerm is in torrentflux 2.4-5.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
#!/bin/sh

set -e
#set -x

. /usr/share/debconf/confmodule
. /usr/share/dbconfig-common/dpkg/prerm.mysql 
dbc_go torrentflux $@

if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then
        # Webservers to check for
        webservers="apache apache-ssl apache-perl apache2"
        restart=""
        found="false"

        for webserver in $webservers; do
            webserver=${webserver%,}

            # Remove the apache config snippet link
            rm -f /etc/$webserver/conf.d/torrentflux.conf

            # Test for the webserver
            test -x /usr/sbin/$webserver || continue
            test -d /etc/$webserver/conf.d || continue

            # Prompt for webserver restart
            found="true"
            db_reset torrentflux/restart-webserver || true
            db_subst torrentflux/restart-webserver webserver "$webserver"
            db_input high torrentflux/restart-webserver || true
            db_go
            db_get torrentflux/restart-webserver
            if [ "$RET" = "true" ]; then
                restart="$restart $webserver"
            fi
        done

        if [ "$found" = "false" ] ; then
            db_input high torrentflux/unsupported-webserver || true
            db_go
        fi

        # Tell debconf to stop so it doesn't get confused
        db_stop

        for webserver in $restart; do
            webserver=${webserver%,}

            # Restart the webserver
            if [ -x /usr/sbin/invoke-rc.d ]; then
                invoke-rc.d $webserver restart >&2
            else
                /etc/init.d/$webserver restart >&2
            fi
        done
fi

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



exit 0