File: postrm

package info (click to toggle)
myphpmoney 1.3RC3-13
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 4,160 kB
  • ctags: 884
  • sloc: php: 18,081; pascal: 2,106; sh: 327; xml: 239; makefile: 137; sql: 130
file content (45 lines) | stat: -rw-r--r-- 1,068 bytes parent folder | download | duplicates (2)
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
#! /bin/sh
# postrm script for myphpmoney

set -e

case "$1" in
	purge)
		if [ -x /usr/share/debconf/confmodule ] ; then
			. /usr/share/debconf/confmodule
			db_version 2.0
			db_title MyPhpMoney

			db_get myphpmoney/postrm_remove_database || true
			if [ "$RET" = "true" ]; then
				db_get "myphpmoney/databasemgr_server" || true
				dbserver="$RET"
				db_get "myphpmoney/database_name" || true
				dbname="$RET"
                		db_get "myphpmoney/mysql_dbadmin" || true
				dbadmin="$RET"
				db_get "myphpmoney/dbadmpass" || true
				dbadmpass="$RET"
				db_reset "myphpmoney/dbadmpass" || true
				. /usr/share/wwwconfig-common/mysql-dropdb.sh
			fi
		fi			
		rm -rf /var/lib/myphpmoney
        ;;
	remove)
		rm -f /var/lib/myphpmoney/public_html/config/settings.inc.php
	;;
	upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
	;;
	*)
        	echo "postrm called with unknown argument \`$1'" >&2
        	exit 1
	;;
esac

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

#DEBHELPER#

exit 0