#!/bin/bash -eu

if [[ "${SFTPGO_AUTHD_USERNAME:=}" != "anonymous" ]]; then
  exit 0
fi
  cat <<EOF
{
  "status": 1,
  "username": "anonymous",
  "home_dir": "/opt/sftpgo/data/home/anonymous",
  "permissions": {
    "/": [
      "list",
      "download"
    ]
  },
  "virtual_folders": [
    {
      "id": 1,
      "name": "firmwares",
      "mapped_path": "/opt/sftpgo/data/folders/firmwares",
      "description": "Android firmwares",
      "used_quota_size": 0,
      "used_quota_files": 0,
      "last_quota_update": 0,
      "filesystem": {
        "provider": 0,
        "s3config": {},
        "gcsconfig": {},
        "azblobconfig": {},
        "cryptconfig": {},
        "sftpconfig": {}
      },
      "virtual_path": "/firmwares",
      "quota_size": -1,
      "quota_files": -1
    }
  ]
}
EOF
