diff options
author | Marcello Stanisci <stanisci.m@gmail.com> | 2019-06-08 13:45:41 +0200 |
---|---|---|
committer | Marcello Stanisci <stanisci.m@gmail.com> | 2019-06-08 13:45:41 +0200 |
commit | 611e60c3fa58fecc10a821d5b4e1d77eca5528a3 (patch) | |
tree | 53be93cb8bda0a6a4369660593aa99cd380f2f5c /bin/taler-deployment-keyup | |
parent | a30d49bccd6545d4b6d99785987777b4c452cd60 (diff) | |
download | deployment-611e60c3fa58fecc10a821d5b4e1d77eca5528a3.tar.gz deployment-611e60c3fa58fecc10a821d5b4e1d77eca5528a3.tar.bz2 deployment-611e60c3fa58fecc10a821d5b4e1d77eca5528a3.zip |
Avoid hardcoded paths
Diffstat (limited to 'bin/taler-deployment-keyup')
-rwxr-xr-x | bin/taler-deployment-keyup | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/bin/taler-deployment-keyup b/bin/taler-deployment-keyup index 1fd7ce0..65d5f07 100755 --- a/bin/taler-deployment-keyup +++ b/bin/taler-deployment-keyup @@ -2,9 +2,6 @@ # Generate denomination keys and get them # signed by the auditor. -# -# -# set -eu @@ -13,16 +10,19 @@ if test -z $TALER_CONFIG_ENV; then exit 1 fi -auditor_request_dir=${HOME}/shared-data/exchange/auditor-request/ +AUDITOR_REQUEST_DIR=$(taler-config -s exchange -o autitor_inputs -f) +AUDITOR_BASE_DIR=$(taler-config -s exchangedb -o autitor_base_dir -f) +EXHCANGE_PUB=$(taler-config -s exchange -o master_public_key) +EXHCANGE_URL=$(taler-config -s exchange -o base_url) mkdir -p $auditor_request_dir taler-exchange-keyup \ - -m ${HOME}/shared-data/exchange/offline-keys/master.priv \ - -o $auditor_request_dir/auditor_request + -m $(taler-config -s exchange -o master_priv_file -f) \ + -o $AUDITOR_REQUEST_DIR/auditor_request taler-auditor-exchange \ - -m $(taler-config -s exchange -o master_public_key) \ - -u $(taler-config -s exchange -o base_url) + -m $EXCHANGE_PUB \ + -u $EXCHANGE_URL # Checks whether any denom key was generated, and # only sign it if so. @@ -30,15 +30,8 @@ if [[ -s $auditor_request_dir/auditor_request ]]; then echo "Signing key material by auditor.." taler-auditor-sign \ -u $TALER_ENV_URL_AUDITOR \ - -m $(taler-config -s exchange -o master_public_key) \ + -m $EXCHANGE_PUB \ -r "$auditor_request_dir/auditor_request" \ - -o "$(taler-config -s exchangedb -o auditor_base_dir -f)/$(date +%s%N)" \ + -o "$AUDITOR_BASE_DIR/$(date +%s%N)" \ -c ${HOME}/.config/taler.conf fi - -# Make sure the creator sets those permissions; or-ing -# with 'true' is needed as when the other party will -# execute this it will fail to chmod, but the permissions -# are already right. -chgrp -R ${TALER_CONFIG_ENV} ${HOME}/shared-data/exchange/live-keys/ -chmod -R g+rx ${HOME}/shared-data/exchange/live-keys/ || true |