This file is indexed.

postrm is in zentyal-core 2.3.4.

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

set -e

# Automatically added by dh_installinit
if [ "$1" = "purge" ] ; then
	update-rc.d zentyal remove >/dev/null
fi
# End automatically added section
# 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


case "$1" in
    purge)
        # logs database
        db_name="zentyal"
        db_user="zentyal"
        echo "DROP DATABASE $db_name;
              DROP USER '$db_user'@'localhost';" | mysql --defaults-file=/etc/mysql/debian.cnf
        rm -f /var/lib/zentyal/.db-created

        # delete apache certificates
        rm -f /var/lib/zentyal/conf/ssl.crt/ebox.cert /var/lib/zentyal/conf/ssl.key/ebox.key \
            /var/lib/zentyal/conf/ssl.pem/ebox.pem

        # delete logs
        rm -rf /var/log/zentyal

        # delete ebox user
        deluser --remove-home ebox
    ;;
esac

exit 0