#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# shellcheck source=ransombackup-common
source "${SCRIPT_DIR}/ransombackup-common"
if ! command -v curl >/dev/null 2>&1; then
  echo "curl non installato" >&2
  exit 1
fi
printf 'user = "%s:%s"\n' "${RB_USERNAME}" "${RB_BACKUP_TOKEN}" | curl --config - \
  --fail --silent --show-error \
  --header 'Accept: application/json' \
  "${RB_GATEWAY%/}/api/v1/account"
printf '\n'
