summaryrefslogtreecommitdiff
path: root/nlnet/task5/date-range/start-libeufin.sh
blob: 8f000a454c908ee28ddb122c691de9281629cbce (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
DB_CONN="postgresql:///libeufincheck"
export LIBEUFIN_SANDBOX_DB_CONNECTION=$DB_CONN
export LIBEUFIN_NEXUS_DB_CONNECTION=$DB_CONN

echo -n Delete previous data...
libeufin-sandbox reset-tables
libeufin-nexus reset-tables
echo DONE
echo -n Configure the default demobank with MANA...
libeufin-sandbox config --with-signup-bonus --currency MANA default
echo DONE
echo -n Setting the default exchange at Sandbox...
libeufin-sandbox \
  default-exchange \
  "https://exchange.example.com/" \
  "payto://iban/NOTUSED"
echo DONE
echo -n Start the bank...
export LIBEUFIN_SANDBOX_ADMIN_PASSWORD=foo
libeufin-sandbox serve > sandbox.log 2>&1 &
SANDBOX_PID=$!
echo DONE
echo -n Wait for the bank...
curl --max-time 4 --retry-all-errors --retry-connrefused --retry-delay 1 --retry 10 http://localhost:5000/ &> /dev/null
echo DONE
echo -n Make one superuser at Nexus...
libeufin-nexus superuser test-user --password x
echo DONE
echo -n Launching Nexus...
libeufin-nexus serve &> nexus.log &
NEXUS_PID=$!
echo DONE
echo -n Waiting for Nexus...
curl --max-time 4 --retry-all-errors --retry-connrefused --retry-delay 1 --retry 10 http://localhost:5001/ &> /dev/null
echo DONE