gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-grid5k] 15/189: fix wallet startup


From: gnunet
Subject: [taler-grid5k] 15/189: fix wallet startup
Date: Thu, 28 Apr 2022 10:46:25 +0200

This is an automated email from the git hooks/post-receive script.

marco-boss pushed a commit to branch master
in repository grid5k.

commit f605b98d6612223fc17782ece85288b51efff6e8
Author: Boss Marco <bossm8@bfh.ch>
AuthorDate: Sun Feb 20 15:15:49 2022 +0100

    fix wallet startup
---
 experiment/scripts/database.sh | 25 +++++++++++++++----------
 experiment/scripts/run.sh      |  2 +-
 2 files changed, 16 insertions(+), 11 deletions(-)

diff --git a/experiment/scripts/database.sh b/experiment/scripts/database.sh
index db3ee25..95ffb51 100755
--- a/experiment/scripts/database.sh
+++ b/experiment/scripts/database.sh
@@ -42,16 +42,6 @@ function setup_config() {
   sed -i "s\<DB_URL_HERE>\postgresql:///${DB_NAME}\g" \
        /etc/taler/secrets/exchange-db.secret.conf
   
-  # Enable password for taler since this is the case in real world deployments
-  # For the postgres user do not enable authentication (used in metrics)
-  if ! grep -q "host all ${DB_USER} 127.16.0.0/12 md5" \
-    /etc/postgresql/${POSTGRES_VERSION}/main/pg_hba.conf; then
-    echo "
-    host all ${DB_USER} 172.16.0.0/12 md5
-    host all postgres 172.16.0.0/12 trust
-    " >> /etc/postgresql/${POSTGRES_VERSION}/main/pg_hba.conf
-  fi
-
   # Get hardware info to tune in postgresql.conf
   SHARED_MEM=$(($(awk '/MemTotal/ {print $2}' /proc/meminfo) / 3 ))
   CACHE_SIZE=$(($(awk '/MemTotal/ {print $2}' /proc/meminfo) * 3/4))
@@ -138,6 +128,18 @@ function setup_pgbouncer() {
   fi
 }
 
+function enable_remote_access() {
+  # Enable password for taler since this is the case in real world deployments
+  # For the postgres user do not enable authentication (used in metrics)
+  if ! grep -q "host all ${DB_USER} 127.16.0.0/12 md5" \
+    /etc/postgresql/${POSTGRES_VERSION}/main/pg_hba.conf; then
+    echo "
+    host all ${DB_USER} 172.16.0.0/12 md5
+    host all postgres 172.16.0.0/12 trust
+    " >> /etc/postgresql/${POSTGRES_VERSION}/main/pg_hba.conf
+  fi
+}
+
 function setup_distributed_db() {
 
   cp ${G5K_HOME}/sql/exchange-0001.sql /usr/share/taler/sql/exchange/
@@ -236,6 +238,9 @@ psql -d "${DB_NAME}"
 GRANT SELECT,INSERT,UPDATE ON ALL TABLES IN SCHEMA public TO "${DB_USER}";
 GRANT USAGE ON ALL SEQUENCES IN SCHEMA public TO "${DB_USER}";
 EOF
+
+  enable_remote_access
+  systemctl restart postgresql
 }
 
 case ${1} in 
diff --git a/experiment/scripts/run.sh b/experiment/scripts/run.sh
index e858ad9..7298cd7 100644
--- a/experiment/scripts/run.sh
+++ b/experiment/scripts/run.sh
@@ -57,7 +57,7 @@ elif [[ "${HOSTNAME}" =~ ${PROXY_HOSTS} ]]; then
 elif [[ "${HOSTNAME}" =~ ${DNS_HOSTS} ]]; then 
     set_host dns
     setup_log
-elif [[ "${HOSTNAME}" =~ ${WALLET_HOSTS} ]]; then 
+else
     set_host wallet
     set_ddn "${WALLET_DOMAIN//\*/${HOST}}"
     enable_netdelay ${PROXY_DOMAIN}

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]