This file is indexed.

postrm is in bacula-director-pgsql 7.0.5+dfsg-4build1.

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

set -e


THISDB=pgsql
CONFFILE=/etc/bacula/bacula-dir.conf


if [ -f /usr/share/debconf/confmodule ]; then
	. /usr/share/debconf/confmodule
        db_version 2.0
fi

if [ -f /usr/share/dbconfig-common/dpkg/postrm.$THISDB ]; then
	. /usr/share/dbconfig-common/dpkg/postrm.$THISDB
        dbc_go bacula-director-$THISDB $@
fi


case "$1" in
  purge)
    UCF_CONFIG_FILES="/etc/default/bacula-dir \
      /etc/bacula/scripts/delete_catalog_backup"

		# purge configs if there are no installed package
		# for other database type
    for CONF in $UCF_CONFIG_FILES; do
      if which ucfq >/dev/null && \
        ! (ucfq -w "$CONF" |egrep -q "^$CONF:bacula-director-$THISDB:");
      then
        continue
      fi

			rm -f "$CONF" "$CONF.ucf-old" "$CONF.ucf-new" "$CONF.ucf-dist"

			if which ucf >/dev/null; then
				ucf --purge "$CONF"
			fi
			if which ucfr >/dev/null; then
				ucfr --purge bacula-director-$THISDB "$CONF"
			fi
		done
  ;;
esac


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

# Automatically added by dh_installdeb
dpkg-maintscript-helper dir_to_symlink /usr/share/doc/bacula-director-pgsql bacula-common 7.0.5+dfsg-4~ -- "$@"
# 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


exit 0