gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [taler-deployment] branch master updated: dir maker


From: gnunet
Subject: [GNUnet-SVN] [taler-deployment] branch master updated: dir maker
Date: Sat, 08 Jun 2019 13:34:22 +0200

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

marcello pushed a commit to branch master
in repository deployment.

The following commit(s) were added to refs/heads/master by this push:
     new a30d49b  dir maker
a30d49b is described below

commit a30d49bccd6545d4b6d99785987777b4c452cd60
Author: Marcello Stanisci <address@hidden>
AuthorDate: Sat Jun 8 13:34:16 2019 +0200

    dir maker
---
 bin/taler-deployment-shared-data | 54 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)

diff --git a/bin/taler-deployment-shared-data b/bin/taler-deployment-shared-data
new file mode 100755
index 0000000..805fcf6
--- /dev/null
+++ b/bin/taler-deployment-shared-data
@@ -0,0 +1,54 @@
+#!/bin/bash
+
+# @author Marcello Stanisci
+# @brief Creates the directories hierarchy under $HOME/shared-data/.
+#        Note: shared-data/ must already exist and give execute
+#        permission to the group (test|demo).  Also note that any
+#        program that creates files must set perms by its own!
+
+if test -z $TALER_CONFIG_ENV; then
+  echo Please run 'source ~/activate' first.
+  exit 1
+fi
+
+SHARED_DATA=$(taler-config -s paths -o taler_deployment_shared -f)
+
+# Check shared-data/ exists & has write permissions for group.
+if ! test -f $SHARED_DATA; then
+  echo Please bootstrap your setup first (run "bootstrap-bluegreen" script?).
+  exit 1
+fi
+
+# Check if shared-data/ has already a hierarchy.
+if find $SHARED_DATA -type d | grep -q [a-zA-Z]; then
+  echo $SHARED_DATA not empty, exiting
+  exit 0
+fi
+
+if ! test -w $SHARED_DATA; then
+  echo "Can't write under $SHARED_DATA, please ajdust permissions"
+  exit 0
+fi
+
+declare -A TALER_DIRS=(
+  [MERCHANT_WIRE]=$(dirname $(taler-config -s account-merchant -o 
wire_response -f))
+  [MERCHANT]=$(dirname $(taler-config -s instance-default -o keyfile -f))
+  
+  [EXCHANGE_WIREFEES]=$(taler-config -s exchangedb -o wirefee_base_dir -f)
+  [EXCHANGE_AUDITOR_REQUEST]=$(taler-config -s exchangedb -o auditor_inputs -f)
+  [EXCHANGE_WIRE]=$(basename $(taler-config -s account-1 -o wire_response -f))
+  [EXCHANGE_OFFLINE_KEYS]=$(dirname $(taler-config -s exchange -o 
master_priv_file -f))
+  [EXCHANGE_LIVE_KEYS]=$(taler-config -s -o keydir -f)
+  [EXCHANGE_AUDITORS]=$(taler-config -s exchangedb -o auditor_base_dir -f)
+  
+  [AUDITOR_REPORTS]=$(taler-config -s auditor -o reports -f)
+  [AUDITOR_OFFLINE_KEYS]=$(dirname $(taler-config -s auditor -o 
auditor_priv_file -f))
+)
+
+for dir in ${TALER_DIRS[@]}; do
+  mkdir -p $dir
+done
+  
+# All dirs will give only the group RWX perms.
+chgrp -R $TALER_CONFIG_ENV $SHARED_DATA
+chmod -R 070 $SHARED_DATA

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]