Alternc Database is correctly removed if purge is required by user when uninstalling
This commit is contained in:
parent
90ca8897ec
commit
3b5b512a50
|
@ -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?
|
||||||
|
|
Loading…
Reference in New Issue