diff options
Diffstat (limited to 'debian/db/install/pgsql')
-rwxr-xr-x | debian/db/install/pgsql | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/debian/db/install/pgsql b/debian/db/install/pgsql index d61008c..81f0a0e 100755 --- a/debian/db/install/pgsql +++ b/debian/db/install/pgsql | |||
@@ -2,19 +2,22 @@ | |||
2 | 2 | ||
3 | set -eu | 3 | set -eu |
4 | 4 | ||
5 | conf_anastasis_db=/etc/taler/secrets/anastasis-db.secret.conf | ||
6 | conf_override=/etc/taler/override.conf | ||
7 | |||
5 | # get database settings from dbconfig-common and configure | 8 | # get database settings from dbconfig-common and configure |
6 | # for ADMINISTRATIVE access | 9 | # for ADMINISTRATIVE access |
7 | if [ -f /etc/dbconfig-common/anastasis.conf ]; then | 10 | if [ -f /etc/dbconfig-common/anastasis.conf ]; then |
8 | . /etc/dbconfig-common/anastasis.conf | 11 | . /etc/dbconfig-common/anastasis.conf |
9 | case "$dbc_dbtype" in | 12 | case "$dbc_dbtype" in |
10 | pgsql) | 13 | pgsql) |
11 | anastasis-config -w \ | 14 | anastasis-config \ |
12 | -c /etc/anastasis.conf \ | 15 | -c $conf_anastasis_db \ |
13 | -s "stasis-postgres" \ | 16 | -s "stasis-postgres" \ |
14 | -o "CONFIG" \ | 17 | -o "CONFIG" \ |
15 | -V "postgres:///$dbc_dbname" | 18 | -V "postgres:///$dbc_dbname" |
16 | anastasis-config -w \ | 19 | anastasis-config \ |
17 | -c /etc/anastasis.conf \ | 20 | -c $conf_override \ |
18 | -s "anastasis" \ | 21 | -s "anastasis" \ |
19 | -o "DB" \ | 22 | -o "DB" \ |
20 | -V "postgres" | 23 | -V "postgres" |
@@ -50,13 +53,13 @@ if [ -f /etc/dbconfig-common/anastasis.conf ]; then | |||
50 | echo "GRANT SELECT, UPDATE ON ALL SEQUENCES IN SCHEMA public TO \"$dbc_dbuser\";" \ | 53 | echo "GRANT SELECT, UPDATE ON ALL SEQUENCES IN SCHEMA public TO \"$dbc_dbuser\";" \ |
51 | | sudo -u postgres psql "postgres:///$dbc_dbname" | 54 | | sudo -u postgres psql "postgres:///$dbc_dbname" |
52 | 55 | ||
53 | anastasis-config -w \ | 56 | anastasis-config \ |
54 | -c /etc/anastasis.conf \ | 57 | -c $conf_anastasis_db \ |
55 | -s "stasis-postgres" \ | 58 | -s "stasis-postgres" \ |
56 | -o "CONFIG" \ | 59 | -o "CONFIG" \ |
57 | -V "postgres://$dbc_dbuser:$dbc_dbpass@$dbc_dbserver/$dbc_dbname" | 60 | -V "postgres://$dbc_dbuser:$dbc_dbpass@$dbc_dbserver/$dbc_dbname" |
58 | anastasis-config -w \ | 61 | anastasis-config \ |
59 | -c /etc/anastasis.conf \ | 62 | -c $conf_override \ |
60 | -s "anastasis" \ | 63 | -s "anastasis" \ |
61 | -o "DB" \ | 64 | -o "DB" \ |
62 | -V "postgres" | 65 | -V "postgres" |