Remove rbk_api.conf and use RSC JSON file

This commit is contained in:
2025-10-15 10:13:04 +01:00
parent 7ed76ad0d3
commit 150f065349
7 changed files with 28 additions and 267 deletions

View File

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