aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorms <ms@taler.net>2021-08-20 16:38:20 +0200
committerms <ms@taler.net>2021-08-20 16:38:52 +0200
commit711c0dbd837a43c1e1b29df675bb063f35865b95 (patch)
tree20fa6a758fc2ad8752b0d6e3431429c7c0ae5f51
parent4e8169b9d271f7a41f76fc84e0ac26d39ad6c413 (diff)
downloadanastasis-711c0dbd837a43c1e1b29df675bb063f35865b95.tar.gz
anastasis-711c0dbd837a43c1e1b29df675bb063f35865b95.zip
Anastasis/Libeufin setup script: first steps.
-rwxr-xr-x[-rw-r--r--]src/cli/test_iban.sh57
1 files changed, 57 insertions, 0 deletions
diff --git a/src/cli/test_iban.sh b/src/cli/test_iban.sh
index e43dc10..a7695e5 100644..100755
--- a/src/cli/test_iban.sh
+++ b/src/cli/test_iban.sh
@@ -14,6 +14,7 @@ set -eu
14# installed/available 14# installed/available
15#* starts Nexus (in background) 15#* starts Nexus (in background)
16#* starts sandbox (in background) 16#* starts sandbox (in background)
17# ~~~~~~~~~
17#* creates two IBAN accounts 18#* creates two IBAN accounts
18#* stores IBANs of both accounts in shell variables, 19#* stores IBANs of both accounts in shell variables,
19# call them IBAN_CREDIT and IBAN_DEBIT. 20# call them IBAN_CREDIT and IBAN_DEBIT.
@@ -34,3 +35,59 @@ set -eu
34#echo -n "Starting sandbox ..." 35#echo -n "Starting sandbox ..."
35## DO WORK 36## DO WORK
36#echo " DONE" 37#echo " DONE"
38
39if ! libeufin-cli --version &> /dev/null; then
40 echo "libeufin-cli not found"
41 exit 77;
42fi
43
44if ! libeufin-nexus --version &> /dev/null; then
45 echo "libeufin-nexus not found"
46 exit 77;
47fi
48
49if ! libeufin-sandbox --version &> /dev/null; then
50 echo "libeufin-sandbox not found"
51 exit 77;
52fi
53
54if ! psql -d anastasischeck -c "\q" &> /dev/null; then
55 echo "Postgresql database 'anastasischeck' not reachable"
56 exit 77
57fi
58
59CURRENCY="TESTKUDOS"
60export LIBEUFIN_NEXUS_DB_CONNECTION="jdbc:sqlite:$(mktemp -u /tmp/nexus-db-XXXXXX.sqlite)"
61export LIBEUFIN_SANDBOX_DB_CONNECTION="jdbc:sqlite:$(mktemp -u /tmp/sandbox-db-XXXXXX.sqlite)"
62NEXUS_URL="http://localhost:5001/"
63SANDBOX_URL="http://localhost:5000/"
64
65echo "Starting Nexus .."
66libeufin-nexus serve &> nexus.log &
67nexus_pid=$!
68if ! curl -s --retry 5 --retry-connrefused $NEXUS_URL > /dev/null; then
69 echo "Could not launch Nexus"
70 exit 77
71fi
72echo "Nexus started."
73
74echo "Starting Sandbox .."
75libeufin-sandbox serve &> sandbox.log &
76sandbox_pid=$!
77if ! curl -s --retry 5 --retry-connrefused $SANDBOX_URL > /dev/null; then
78 echo "Could not launch Sandbox"
79 exit 77
80fi
81echo "Sandbox started."
82
83#libeufin-nexus serve &> nexus.log &
84#nexus_pid=$!
85#echo "Starting Sandbox .."
86#libeufin-sandbox serve &> sandbox.log &
87#sandbox_pid=$!
88#
89# FIXME: not always both services get killed.
90trap "echo Terminating services.; kill $nexus_pid; kill $sandbox_pid" EXIT
91#
92#curl -s --retry 5 --retry-connrefused $NEXUS_URL > /dev/null
93#curl -s --retry 5 --retry-connrefused $SANDBOX_URL > /dev/null