View | Details | Raw Unified | Return to bug 10942
Collapse All | Expand All

(-)a/debian/koha-common.default (+13 lines)
Lines 1-3 Link Here
1
## General koha-common default options
1
## General koha-common default options
2
2
3
PERL5LIB="/usr/share/koha/lib"
3
PERL5LIB="/usr/share/koha/lib"
4
5
## Automatic template translation update
6
#
7
# This variable controls whether template translations should
8
# be updated automatically on koha-common package upgrades.
9
# Options: 'yes'
10
#          'no'  (default)
11
# Note: if you choose 'no' then you will have to issue
12
#  $ koha-translate --update <lang_code>
13
#
14
#AUTOMATIC_TRANSLATIONS_UPDATE="no"
15
16
## End of general koha-common default options
(-)a/debian/koha-common.postinst (-1 / +25 lines)
Lines 2-9 Link Here
2
2
3
set -e
3
set -e
4
4
5
NAME="koha-common"
6
AUTOMATIC_TRANSLATIONS_UPDATE='no'
7
5
. /usr/share/debconf/confmodule
8
. /usr/share/debconf/confmodule
6
9
10
# Read configuration variable file if it is present
11
if [ -r /etc/default/$NAME ]; then
12
    # Debian / Ubuntu
13
    . /etc/default/$NAME
14
elif [ -r /etc/sysconfig/$NAME ]; then
15
    # RedHat / SuSE
16
    . /etc/sysconfig/$NAME
17
fi
18
7
conf=/etc/mysql/koha-common.cnf
19
conf=/etc/mysql/koha-common.cnf
8
if [ ! -e "$conf" ] && [ ! -L "$conf" ]
20
if [ ! -e "$conf" ] && [ ! -L "$conf" ]
9
then
21
then
Lines 14-19 fi Link Here
14
26
15
koha-upgrade-schema $(koha-list)
27
koha-upgrade-schema $(koha-list)
16
28
29
if [ "$AUTOMATIC_TRANSLATIONS_UPDATE" = "yes" ]; then
30
    for lang in $(koha-translate --list | grep -v -x "en"); do
31
        if koha-translate --update $lang; then
32
            echo "Updated the $lang translations."
33
        else
34
            cat <<EOF
35
ERROR: an error was found when updating '$lang' translations. Please manually
36
run koha-translate --update $lang. Run man koha-translate for more options.
37
EOF
38
        fi
39
    done
40
fi
41
17
db_stop
42
db_stop
18
43
19
exit 0
44
exit 0
20
- 

Return to bug 10942