Bug 11404: Make the install process aware of the changes
[koha-equinox.git] / debian / koha-common.config
1 #!/bin/sh
2
3 # koha-common.config - ensures that debconf stuff is all handled properly
4 #
5 # Copyright 2011  Catalyst IT, Ltd
6
7 # This program is free software: you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation, either version 3 of the License, or
10 # (at your option) any later version.
11
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 # GNU General Public License for more details.
16
17 # You should have received a copy of the GNU General Public License
18 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
19
20 set -e
21
22 . /usr/share/debconf/confmodule
23
24 CONFIGFILE=/etc/koha/koha-common.conf
25
26 if [ -e $CONFIGFILE ]; then
27     . $CONFIGFILE || true
28     # Put the current values into debconf
29     UPDATE="true"
30     if [ "$AUTOMATIC_TRANSLATIONS_UPDATE" = "no" ] ; then
31         UPDATE="false"
32     fi
33     db_set koha-common/automatically-update-translations "$UPDATE"
34 else
35     # True is the default
36     db_set koha-common/automatically-update-translations true
37 fi
38
39 if dpkg --compare-versions "$2" lt-nl 3.4 ; then
40     db_input high koha-common/3.2-3.4-upgrade-notice || true
41 fi
42
43 db_input medium koha-common/automatically-update-translations || true
44
45 db_input high koha-common/rename-apache-vhost-files || true
46
47 db_go || true
48