Alternc Database is correctly removed if purge is required by user when uninstalling

This commit is contained in:
Axel ROGER 2012-08-25 14:27:08 +00:00
parent 90ca8897ec
commit 3b5b512a50
1 changed files with 3 additions and 1 deletions

View File

@ -4,6 +4,8 @@ set -e
. /usr/share/debconf/confmodule . /usr/share/debconf/confmodule
ALTERNC_DB=$(cat /etc/alternc/my.cnf |grep ^database|cut -d '"' -f 2)
# * postrm remove # * postrm remove
# * postrm purge # * postrm purge
# * old-postrm upgrade new-version # * old-postrm upgrade new-version
@ -23,7 +25,7 @@ case "$1" in
db_go db_go
db_get alternc/postrm_remove_databases || true db_get alternc/postrm_remove_databases || true
if [ "$RET" = "true" ]; then 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 fi
# Purge datafiles? # Purge datafiles?