summaryrefslogtreecommitdiff
path: root/debian/taler-merchant.config
blob: 35d901cec7bb554d9a05aaa8179c40f15372e30a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/sh

set -e

. /usr/share/debconf/confmodule

db_input low taler-merchant/username || true
db_go

db_input low taler-merchant/groupname || true
db_go

# Set permissions for sqlite3 file
# (for when we support sqlite3 in the future)
dbc_dbfile_owner="${_USERNAME}:${_GROUPNAME}"
dbc_dbfile_perms="0600"

dbc_psql_createdb_encoding="UTF8"

# Set MySQL encoding to UTF8, just in case MySQL
# support is added in the future.
dbc_mysql_createdb_encoding="UTF8"

# Try to get it to use UNIX domain sockets, if possible.
# (Note: doesn't seem to do much, still uses username+PW+TCP
#  on my system :-(  dbconfig documentation sucks.).
dbc_authmethod_user=ident
dbc_authmethod_admin=ident


db_get taler-merchant/username
_USERNAME="${RET:-taler-merchant-httpd}"
dbc_dbuser=${_USERNAME}


if [ -f /usr/share/dbconfig-common/dpkg/config.pgsql ]; then
    . /usr/share/dbconfig-common/dpkg/config.pgsql
    dbc_go taler-merchant "$@"
fi

db_stop