diff --git a/bin/getfile.sh b/bin/getfile.sh index 8960a469511480ef663aad3c65b42cd158cdbb05..3e3bdc82ad9eace6fda9a54fd2881f9299c56acc 100755 --- a/bin/getfile.sh +++ b/bin/getfile.sh @@ -9,13 +9,14 @@ # 2021-04-13 v1.1 <axel.hahn@iml.unibe.ch> add support for custom config # 2021-04-15 v1.2 <axel.hahn@iml.unibe.ch> added debugging of curl request # 2021-10-14 v1.3 <axel.hahn@iml.unibe.ch> add nanoseconds in hashed base data +# 2023-02-14 v1.4 <axel.hahn@unibe.ch> compatibility to openssl v3 # ====================================================================== # ---------------------------------------------------------------------- # CONFIG # ---------------------------------------------------------------------- -version="v1.3" +version="v1.43" about="CI PACKAGE GETTER $version; (c) 2021 Institute for Medical Education (IML); University of Bern; GNU GPL 3.0" @@ -123,7 +124,7 @@ function makeRequest(){ if [ $bDebug = 1 ]; then echo $line - echo $apiMethod ${apiHost}${apiRequest} + echo "$apiMethod ${apiHost}${apiRequest}" echo $line fi @@ -132,7 +133,7 @@ function makeRequest(){ # --- date in http format LANG=en_EN # export TZ=GMT - apiTS=`date "+%a, %d %b %Y %H:%M:%S.%N %Z"` + apiTS=$(date "+%a, %d %b %Y %H:%M:%S.%N %Z") # --- generate data to hash: method + uri + timestamp; delimited with line break @@ -147,8 +148,8 @@ ${apiTS} fi # generate hash - split in 2 commands (piping "cut" sends additional line break) - myHash=`echo -n "$data" | openssl sha1 -hmac "${secret}" | cut -f 2 -d" "` - myHash=`echo -n "$myHash" | base64` + myHash=$(echo -n "$data" | openssl dgst -sha1 -hex -hmac "${secret}" | cut -f 2 -d " ") + myHash=$(echo -n "$myHash" | base64) moreheaders="--fail" test $bDebug = 1 && moreheaders="-i" diff --git a/deploy_app.sh b/deploy_app.sh index 7e16f9a6d5e1e108a3016b3dea1016e3cdd1134c..a0a24b6f2e9adcbc6b10dc3909710634114e6a89 100755 --- a/deploy_app.sh +++ b/deploy_app.sh @@ -13,6 +13,7 @@ # 2021-11-02 v0.7 <axel.hahn@iml.unibe.ch> delete logs keping N files # 2022-11-24 v0.8 <axel.hahn@iml.unibe.ch> tar -xzf without dot as 2nd param # 2022-11-25 v0.9 <axel.hahn@iml.unibe.ch> support custom phase + file per project +# 2023-02-14 v1.0 <axel.hahn@unibe.ch> set v1.0 (no changes) # ====================================================================== @@ -21,7 +22,7 @@ # ---------------------------------------------------------------------- cd $( dirname $0 ) selfdir=$( /bin/pwd ) -_version=0.9 +_version=1.0 tmpdir=/var/tmp/imldeployment_packages logdir=/var/log/imldeployment-client