63 lines
1.3 KiB
Bash
Executable File
63 lines
1.3 KiB
Bash
Executable File
#! /bin/sh
|
|
# postrm script for ccm-cms-types-siteproxy
|
|
#
|
|
# see: dh_installdeb(1)
|
|
#
|
|
# Author: Berkan Eskikaya <berkan@runtime-collective.com>, 2004
|
|
#
|
|
# $Id: postrm,v 1.1.1.1 2004/11/12 09:30:10 fabrice Exp $
|
|
|
|
set -e
|
|
|
|
. /usr/share/debconf/confmodule
|
|
. /usr/share/ccm-tools/lib/shellmodule
|
|
|
|
db_get_ccm_settings
|
|
|
|
get_pkgname_from_arg "$0"
|
|
ccm_package_name="$RET"
|
|
get_pkgversion_from_dpkg "$ccm_package_name"
|
|
ccm_package_version="$RET"
|
|
|
|
if [ "$ccm_package_name" != "ccm-core" ]; then
|
|
exit 0 ;# nothing to do
|
|
fi
|
|
|
|
case "$1" in
|
|
purge-FIXME)
|
|
# FIXME: there are problems with this, so disabling for the moment.
|
|
|
|
# maybe drop the database
|
|
if [ "$dbase_host" = "localhost" ]; then
|
|
|
|
db_input high ccm/shared/pg_drop_database_at_purge_p || true
|
|
db_go
|
|
db_stop
|
|
|
|
if [ "$pg_drop_database_at_purge_p" = "true" ]; then
|
|
su - postgres -c "dropdb $dbase_name" 1>&2 || true
|
|
su - postgres -c "dropuser $dbase_user" 1>&2 || true
|
|
fi
|
|
|
|
fi
|
|
|
|
# FIXME: should we still remove /etc/ccm/conf/registry/registry.properties,
|
|
# even if we don't or fail to drop the database.
|
|
rm -rf /etc/ccm/conf/registry/*
|
|
;;
|
|
|
|
*)
|
|
# Nothing to do here.
|
|
;;
|
|
|
|
esac
|
|
|
|
# dh_installdeb will replace this with shell code automatically
|
|
# generated by other debhelper scripts.
|
|
|
|
#DEBHELPER#
|
|
|
|
exit 0
|
|
|
|
|