5 . /usr/share/debconf/confmodule
7 db_input medium roundcube/hosts || true
10 # Retrieve all available languages
11 instd_langs=$(echo /usr/share/roundcube/program/localization/*/messages.inc | \
12 sed 's+[^ ]*/\([^ ]*\)/messages.inc+\1,+g' | sed 's+,$++')
13 # Retrieve the old list
14 db_metaget roundcube/language languages && oldchoices="$RET"
15 if [ ! "$oldchoices" ] || [ "$instd_langs" != "$oldchoices" ]; then
16 db_subst roundcube/language languages $instd_langs
17 db_fset roundcube/language seen false
18 # Firs try to get the current choice in case of preseeding
19 db_get roundcube/language || true
21 if [ -n $locale -a -d /usr/share/roundcube/program/localization/$locale ]; then
22 db_set roundcube/language $locale
24 # Try to guess the locale
25 locale=$(echo $LANG | sed 's/[@\.].*//')
26 if [ -d /usr/share/roundcube/program/localization/$locale ]; then
27 db_set roundcube/language $locale
29 locale=$(echo $locale | sed 's/_.*//')
30 if [ -d /usr/share/roundcube/program/localization/$locale ]; then
31 db_set roundcube/language $locale
33 db_set roundcube/language en_US
39 db_input medium roundcube/language || true
42 if [ -f /usr/share/dbconfig-common/dpkg/config ]; then
43 dbc_dbtypes="mysql, pgsql, sqlite"
44 dbc_authmethod_user="password"
45 . /usr/share/dbconfig-common/dpkg/config
49 db_input medium roundcube/reconfigure-webserver || true
51 db_input medium roundcube/restart-webserver || true