Remove rbk_api.conf and use RSC JSON file
This commit is contained in:
11
rsc_ops.sh
11
rsc_ops.sh
@@ -8,7 +8,16 @@
|
||||
#--------------------------------------------------------------------------------------------------------
|
||||
|
||||
MYDIR="$(dirname "$(realpath "$0")")"
|
||||
source $MYDIR/rbk_api.conf
|
||||
|
||||
# Load RSC configuration from rsc.json
|
||||
if [ -f "$MYDIR/rsc.json" ]; then
|
||||
RSC_ID=$(jq -r '.client_id' "$MYDIR/rsc.json")
|
||||
RSC_SECRET=$(jq -r '.client_secret' "$MYDIR/rsc.json")
|
||||
RSC_HOST=$(jq -r '.access_token_uri' "$MYDIR/rsc.json" | sed 's|https://||' | sed 's|/api/client_token||')
|
||||
else
|
||||
echo "ERROR: rsc.json configuration file not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Set DATE command based on OS
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
|
||||
Reference in New Issue
Block a user