summaryrefslogtreecommitdiff
path: root/experiment/scripts/database.sh
diff options
context:
space:
mode:
authorBoss Marco <bossm8@bfh.ch>2022-05-14 19:55:36 +0200
committerBoss Marco <bossm8@bfh.ch>2022-05-14 19:55:36 +0200
commit51125241e19a7823cb56aa640098d1466a9fffb9 (patch)
tree090a05b6d8c72875b046c5912a22427d0f97ec1d /experiment/scripts/database.sh
parent61f18f296b49318b11468e63723e537a1a0884e9 (diff)
downloadgrid5k-51125241e19a7823cb56aa640098d1466a9fffb9.tar.gz
grid5k-51125241e19a7823cb56aa640098d1466a9fffb9.tar.bz2
grid5k-51125241e19a7823cb56aa640098d1466a9fffb9.zip
verified auditor
Diffstat (limited to 'experiment/scripts/database.sh')
-rwxr-xr-xexperiment/scripts/database.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/experiment/scripts/database.sh b/experiment/scripts/database.sh
index 8a22bb7..3398a9a 100755
--- a/experiment/scripts/database.sh
+++ b/experiment/scripts/database.sh
@@ -229,7 +229,9 @@ function setup_config() {
" > ${PG_CONF}/exchange.conf
# Must be done here otherwise pg does not start a second time
- if [[ ${NUM_AUDITORS} -gt 0 ]]; then
+ if [[ ${NUM_AUDITORS} -ge 1 ]] && \
+ [[ ${TALER_SETUP_AUDITOR_REPLICATION} == 1 ]];
+ then
echo "wal_level=logical" >> ${PG_CONF}/exchange.conf
fi
@@ -259,7 +261,9 @@ function setup_pgbouncer() {
# Enable replication to the auditor - is only done when an auditor node is present
function setup_replication() {
- if [[ "${NUM_AUDITORS}" -gt 0 ]]; then
+ if [[ "${NUM_AUDITORS}" -ge 1 ]] && \
+ [[ ${TALER_SETUP_AUDITOR_REPLICATION} == 1 ]];
+ then
su postgres << EOF
createuser --replication egress
psql -tAc "ALTER ROLE egress WITH PASSWORD '${DB_PASSWORD}';" || true