gnunet-svn
[Top][All Lists]
Advanced

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

[taler-cashless2ecash] branch master updated: feat: build cli script


From: gnunet
Subject: [taler-cashless2ecash] branch master updated: feat: build cli script
Date: Wed, 01 May 2024 14:51:50 +0200

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

joel-haeberli pushed a commit to branch master
in repository cashless2ecash.

The following commit(s) were added to refs/heads/master by this push:
     new 1135b16  feat: build cli script
1135b16 is described below

commit 1135b1636d351f2b7dbd38036cb8235b7e0fc465
Author: Joel-Haeberli <haebu@rubigen.ch>
AuthorDate: Wed May 1 14:51:42 2024 +0200

    feat: build cli script
---
 c2ec/install/build_cli.sh          | 19 +++++++++++++++++++
 c2ec/install/installation_notes.md | 30 +++++++++++++++++++++++++++++-
 2 files changed, 48 insertions(+), 1 deletion(-)

diff --git a/c2ec/install/build_cli.sh b/c2ec/install/build_cli.sh
new file mode 100644
index 0000000..e0ddf86
--- /dev/null
+++ b/c2ec/install/build_cli.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+if [ "$#" -ne 2 ]; then
+    echo "Usage: $0 <source-root> <install-dir>"
+    exit 1
+fi
+
+REPO_ROOT=$1
+INSTALL_DIR=$2
+
+build_c2ec_cli() {
+    go build -o $INSTALL_DIR $REPO_ROOT
+    if [ $? -ne 0 ]; then
+        echo "Failed to build C2EC using Go"
+        exit 1
+    fi
+}
+
+build_c2ec_cli
\ No newline at end of file
diff --git a/c2ec/install/installation_notes.md 
b/c2ec/install/installation_notes.md
index cf22e98..bd43303 100644
--- a/c2ec/install/installation_notes.md
+++ b/c2ec/install/installation_notes.md
@@ -76,10 +76,38 @@ find src directory of cashless2ecash, find 
c2ec/install/setup_db.sh
 export PGHOST=localhost`
 export PGPORT=5432
 ./setup_db.sh c2ec_admin [PASSWORD OBFUSCATED] c2ec ./..
+su postgres
+psql -d c2ec
+```
+
+Grant rights on tables, triggers and functions to the users `c2ec_api` and 
`c2ec_operator`
+
+```sql
+GRANT ALL PRIVILEGES ON c2ec.withdrawal TO c2ec_api;
+GRANT SELECT ON c2ec.terminal TO c2ec_api;
+GRANT SELECT ON c2ec.provider TO c2ec_api;
+GRANT EXECUTE ON FUNCTION c2ec.emit_withdrawal_status TO c2ec_api;
+GRANT EXECUTE ON FUNCTION c2ec.emit_payment_notification TO c2ec_api;
+GRANT EXECUTE ON FUNCTION c2ec.emit_retry_notification TO c2ec_api;
+GRANT EXECUTE ON FUNCTION c2ec.emit_transfer_notification TO c2ec_api;
+GRANT ALL PRIVILEGES ON c2ec.terminal TO c2ec_operator;
+GRANT ALL PRIVILEGES ON c2ec.provider TO c2ec_operator;
+```
+
+### Building and Running the app
+
+Building the cli (used to manage terminals and providers)
+
+```bash
+./build_cli.sh ./../../cli $HOME
+.$HOME/cli
 ```
 
-### Building the app
+Building c2ec
 
 ```bash
 ./build_app.sh ./.. $HOME
+cp $HOME/cashless2ecash/c2ec/c2ec-config.yaml $HOME
+# configure correctly
+.$HOME/c2ec
 ```

-- 
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]