aboutsummaryrefslogtreecommitdiff
path: root/doc/config.sh
diff options
context:
space:
mode:
Diffstat (limited to 'doc/config.sh')
-rwxr-xr-xdoc/config.sh116
1 files changed, 116 insertions, 0 deletions
diff --git a/doc/config.sh b/doc/config.sh
new file mode 100755
index 0000000..6448b38
--- /dev/null
+++ b/doc/config.sh
@@ -0,0 +1,116 @@
1#!/bin/bash
2
3# This file is part of TALER
4# (C) 2014, 2015, 2016 INRIA
5# TALER is free software; you can redistribute it and/or modify it under the
6# terms of the GNU Affero General Public License as published by the Free Software
7# Foundation; either version 3, or (at your option) any later version.
8# TALER is distributed in the hope that it will be useful, but WITHOUT ANY
9# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
10# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
11# You should have received a copy of the GNU General Public License along with
12# TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
13
14# @author Marcello Stanisci
15# @brief Walkthrough configuration steps
16
17echo -e "\nThis script will set and show all the configuration\n\
18values needed to run an example backend. The backend will listen on port 8888\n\
19and cooperate with exchange at https://exchange.demo.taler.net/.\n\
20Additionally, the script will also generate the backend's private\n\
21key and banking details' file.\n\n"
22
23# FIXME:
24# 1) banking details generator missing
25
26echo -n "Press ENTER to start > "
27read
28echo
29
30echo -n "Setting section [merchant]<ENTER> "
31read
32echo
33
34echo -n "taler-config -s merchant -o serve -V TCP<ENTER> "
35read
36echo
37taler-config -s merchant -o serve -V TCP
38
39echo -n "taler-config -s merchant -o port -V 8888<ENTER> "
40read
41echo
42taler-config -s merchant -o port -V 8888
43
44echo -n "taler-config -s merchant -o database -V postgres<ENTER> "
45read
46echo
47taler-config -s merchant -o database -V postgres
48
49echo -n "taler-config -s merchant -o currency -V KUDOS<ENTER> "
50read
51echo
52taler-config -s merchant -o currency -V KUDOS
53
54echo -n "taler-config -s merchant -o wireformat -V TEST<ENTER> "
55read
56echo
57taler-config -s merchant -o wireformat -V TEST
58
59echo -n "Setting section [merchant-instance-default]<ENTER> "
60read
61echo
62
63echo -ne "taler-config -s merchant-instance-default -o keyfile -V \${TALER_DATA_HOME}/key.priv\n\n\
64(The key will be dynamically generated once the backend starts)<ENTER> "
65read
66echo
67taler-config -s merchant-instance-default -o keyfile -V '${TALER_DATA_HOME}/key.priv'
68
69echo -n "Setting section [merchant-instance-wireformat-default]<ENTER> "
70read
71echo
72
73echo -n "taler-config -s merchant-instance-wireformat-default -o test_response_file -V \${TALER_DATA_HOME}/test.json<ENTER> "
74read
75echo
76taler-config -s merchant-instance-wireformat-default -o test_response_file -V '${TALER_DATA_HOME}/test.json'
77
78sleep 1
79echo -ne "Generating test.json..\n\n"
80DEST=$(taler-config -s merchant-instance-wireformat-default -o test_response_file -f)
81echo '{
82 "type": "test",
83 "bank_uri": "https://bank.test.taler.net/",
84 "sig": "MERCHANTSIGNATURE",
85 "account_number": 6,
86 "salt": "SALT"
87 }' > $DEST
88
89echo -n "Setting section [merchantdb-postgres]<ENTER> "
90read
91echo
92
93echo -n "taler-config -s merchantdb-postgres -o config -V postgres:///donations<ENTER> "
94read
95echo
96taler-config -s merchantdb-postgres -o config -V "postgres:///donations"
97
98echo -n "Setting section [merchant-demoexchange]<ENTER> "
99read
100echo
101
102echo -n "taler-config -s merchant-demoexchange -o uri -V https://exchange.demo.taler.net/<ENTER> "
103read
104echo
105taler-config -s merchant-demoexchange -o uri -V "https://exchange.demo.taler.net/"
106
107echo -n "taler-config -s merchant-demoexchange -o master_key -V CQQZ9DY3MZ1ARMN5K1VKDETS04Y2QCKMMCFHZSWJWWVN82BTTH00<ENTER> "
108read
109echo
110taler-config -s merchant-demoexchange -o master_key -V "CQQZ9DY3MZ1ARMN5K1VKDETS04Y2QCKMMCFHZSWJWWVN82BTTH00"
111
112echo -ne "Done. Launch the backend with:\n\
113\$ taler-merchant-httpd\n\nTest it with:\n\
114\$ curl http://127.0.0.1:8888/\n\nIf everything worked \
115fine, you should see:\n\n\
116'Hello, I'm a merchant's Taler backend. This HTTP server is not for humans.'\n\n"