This file is indexed.

postrm is in firebird3.0-server 3.0.2.32703.ds4-11ubuntu2.

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
 93
 94
 95
 96
 97
 98
 99
100
101
102
#! /bin/sh
# postrm script for firebird3.0-server

set -e
if [ -f /usr/share/debconf/confmodule ]; then
    . /usr/share/debconf/confmodule
fi
set -u

# 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' <r>overwrit>r> <new-version>

FB_VER="3.0"
SYS_DB_DIR="/var/lib/firebird/$FB_VER/system"
SEC_DB="$SYS_DB_DIR/security3.fdb"
USER_DB_DIR="/var/lib/firebird/$FB_VER/data"
RUN="/var/run/firebird/$FB_VER"
LOG="/var/log/firebird/firebird$FB_VER.log"
DBAPasswordFile="/etc/firebird/$FB_VER/SYSDBA.password"

# Automatically added by dh_systemd_enable/10.10.5ubuntu1
if [ "$1" = "remove" ]; then
	if [ -x "/usr/bin/deb-systemd-helper" ]; then
		deb-systemd-helper mask 'firebird3.0.service' >/dev/null
	fi
fi

if [ "$1" = "purge" ]; then
	if [ -x "/usr/bin/deb-systemd-helper" ]; then
		deb-systemd-helper purge 'firebird3.0.service' >/dev/null
		deb-systemd-helper unmask 'firebird3.0.service' >/dev/null
	fi
fi
# End automatically added section
# Automatically added by dh_installinit/10.10.5ubuntu1
if [ "$1" = "purge" ] ; then
	update-rc.d firebird3.0 remove >/dev/null
fi


# In case this system is running systemd, we make systemd reload the unit files
# to pick up changes.
if [ -d /run/systemd/system ] ; then
	systemctl --system daemon-reload >/dev/null || true
fi
# End automatically added section
# Automatically added by dh_installdebconf/10.10.5ubuntu1
if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then
	. /usr/share/debconf/confmodule
	db_purge
fi
# End automatically added section


case "$1" in
    remove)
        # remove lock/init/guard files
        rm -f $RUN/isc_lock1.*
        rm -f $RUN/isc_init1.*
        rm -f $RUN/isc_guard1.*

    ;;

    purge)
        # remove stored password
        if [ -f "$DBAPasswordFile" ]; then
            rm "$DBAPasswordFile"
        fi

        # remove security database
        rm -f "$SEC_DB"
        for d in "$SYS_DB_DIR" "/var/lib/firebird/$FB_VER" /var/lib/firebird; do
            if [ -d "$d" ]; then
                rmdir --ignore-fail-on-non-empty "$d"
            fi
        done

        # remove log files
        rm -f "$LOG"*

        # remove databases
        if [ -d "$USER_DB_DIR" ]; then
            find "$USER_DB_DIR" -type f -name "*.fdb" -delete
        fi
    ;;

esac

dpkg-maintscript-helper rm_conffile \
    /etc/default/firebird3.0 3.0.0~svn+61473.ds4-1~ -- "$@"


exit 0

# vi: set ts=8 sts=4 sw=4 filetype=sh ai et :