From 3b5b512a50755102b0d9c41ab9c764b4d7567789 Mon Sep 17 00:00:00 2001 From: Axel ROGER Date: Sat, 25 Aug 2012 14:27:08 +0000 Subject: [PATCH] Alternc Database is correctly removed if purge is required by user when uninstalling --- debian/alternc.postrm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/alternc.postrm b/debian/alternc.postrm index 5df38d70..4e7aed25 100644 --- a/debian/alternc.postrm +++ b/debian/alternc.postrm @@ -4,6 +4,8 @@ set -e . /usr/share/debconf/confmodule +ALTERNC_DB=$(cat /etc/alternc/my.cnf |grep ^database|cut -d '"' -f 2) + # * postrm remove # * postrm purge # * old-postrm upgrade new-version @@ -23,7 +25,7 @@ case "$1" in db_go db_get alternc/postrm_remove_databases || true if [ "$RET" = "true" ]; then - rm -rf /var/alternc/db + /usr/bin/mysql --defaults-file=/etc/alternc/my.cnf -Bs -e "DROP DATABASE $ALTERNC_DB" fi # Purge datafiles?