summaryrefslogtreecommitdiff
path: root/netzbon/config_libeufin_nexus.sh
blob: ae69543ca472622753d4d82853ce4193f3bbf56a (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
#!/bin/bash
# This file is in the public domain.
#
# This script configure and launches libeufin-bank.
# The setup provides the admin account at the bank, and
# another account for the exchange at the bank.
#
# The environment must provide the following variables:
set -eu

source functions.sh
source config/user.conf

# In order to reach the bank, the setup step needs to provide
# the section [ebics-setup].  This is a manual process that is
# to be conducted separately.

if ! taler-config -s "nexus-postgres" -o code &> /dev/null
then echo -e "[nexus-postgres]\n"\
"config = postgresql:///libeufin" \
  >> /etc/libeufin/libeufin-nexus.conf
fi

if ! taler-config -s "nexus-ebics" -o code &> /dev/null
  taler-config -s nexus-ebics -o currency \
    -V $CURRENCY /etc/libeufin/libeufin-nexus.conf
fi

say "Setting up libeufin-nexus database"
libeufin-nexus-dbconfig

say "Start nexus tasks..."
systemctl enable --now libeufin-nexus-ebics-fetch
systemctl enable --now libeufin-nexus-ebics-submit