set -e
+. /usr/share/debconf/confmodule
+
conf=/etc/mysql/koha-common.cnf
-if [ ! -e "$conf" ]
+if [ ! -e "$conf" ] && [ ! -L "$conf" ]
then
- ln -s debian.cnf /etc/mysql/koha-common.cnf
+ ln -s debian.cnf "$conf"
fi
#DEBHELPER#
+
+koha-upgrade-schema $(koha-list)
+
+db_stop
+
+exit 0