This file is indexed.

postrm is in frontaccounting 2.2.10-3.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
 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
#!/bin/sh
# postrm script for frontaccounting

set -e

if [ "$DPKG_DEBUG" = "developer" ]; then
  set -x
fi

lighttpd_remove() {
	if [ -f /etc/lighttpd/conf-available/50-frontaccounting.conf ] ; then
		rm -f /etc/lighttpd/conf-available/50-frontaccounting.conf
		if which lighty-enable-mod >/dev/null 2>&1 ; then
			lighty-disable-mod frontaccounting
		else
			echo "Lighttpd not installed, skipping"
		fi
	fi
}

apache_remove() {
	if [ -d /etc/$webserver/conf.d ] && [ -L /etc/$webserver/conf.d/frontaccounting.conf ]; then
		rm -f /etc/$webserver/conf.d/frontaccounting.conf
	fi
}
if [ -f /usr/share/debconf/confmodule ]; then
    . /usr/share/debconf/confmodule
fi

includefile=/etc/frontaccounting/apache.conf


case "$1" in
	purge)
		db_get "frontaccounting/skipdb"
		if [ "$RET" != "true" ] ; then
			db_get "frontaccounting/postrm"
			if [ "$RET" = "true" ] ; then
				db_get "frontaccounting/db_user"
				dbuser="$RET"
				db_get "frontaccounting/db_pass"
				dbpass="$RET"
				db_get "frontaccounting/db_host"
				dbserver="$RET"
				db_get "frontaccounting/db_name"
				dbname="$RET"
				db_get "frontaccounting/db_admin_user"
				dbadmin="$RET"
				db_input critical "frontaccounting/db_admin_pass" || true
				db_go || true
				db_get "frontaccounting/db_admin_pass"
				dbadmpass="$RET"
				if [ -e /usr/share/wwwconfig-common/mysql-dropdb.sh ] ; then
					. /usr/share/wwwconfig-common/mysql-dropdb.sh
				else
					echo "Can't drop database (can't find wwwconfig-common script)." >&2
				fi
				if [ -e /usr/share/wwwconfig-common/mysql-dropuser.sh ] ; then
					. /usr/share/wwwconfig-common/mysql-dropuser.sh
				else
					echo "Can't drop user (can't find wwwconfig-common script)." >&2
				fi
			fi
		fi

		db_purge
		rm -rf /etc/frontaccounting
		for server in $webservers; do
			server=$(echo $server | sed 's/,$//')

			if [ -d "/etc/${server}/conf.d" ] ; then
				if [ -L "/etc/${server}/conf.d/frontaccounting" ] ; then
					rm "/etc/${server}/conf.d/frontaccounting"
				fi
			else 
				conffile="/etc/$server/httpd.conf"
				if [ -e /usr/share/wwwconfig-common/apache-uninclude.sh ] ; then
					. /usr/share/wwwconfig-common/apache-uninclude.sh
				else
					echo "Can't uninclude apache config part (can't find wwwconfig-common script)." >&2
				fi
			fi
			if [ "$status" = "purge" ] ; then
				restart="$restart $server"
			fi
		done

		servers="apache-ssl apache mysql"
		if [ -e /usr/share/wwwconfig-common/restart.sh ] ; then
			. /usr/share/wwwconfig-common/restart.sh ||
				echo "Couldn't restart servers (wwwconfig-common script failed)." >&2
		else
			echo "Can't restart servers (can't find wwwconfig-common script)." >&2
		fi
	;;
	remove)
	;;
	upgrade)
	;;
	failed-upgrade|abort-install|abort-upgrade|disappear)
	;;
	*)
		echo "postrm called with unknown argument \`$1'" >&2
		exit 0
	;;
esac

if [ "$1" != "upgrade" ] ; then
	db_reset "frontaccounting/db_admin_pass" || true
fi

# 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


db_stop

exit 0