#!/usr/bin/bash
# Lists database user names owned by the given linux account for the specified engine.
# Used during backup discovery to determine which database users belong to an account.
#
# Arguments:
ACCOUNT=$1   # linux account username
ENGINE=$2    # 1 = MySQL, 2 = MongoDB, 3 = PostgreSQL

# Successful output should be a JSON array of database user names (in the first line of the output).
# Each name MUST match the engine-specific format used internally:
#   - MySQL:      "user@host"     e.g. "bob_app@localhost"
#   - PostgreSQL: "user"          e.g. "bob_app"
#   - MongoDB:    "authdb.user"   e.g. "admin.bob_app"
# exit with code 0
# e.g.
# ["bob_app@localhost","bob_admin@%"]
#
# Return ["..."] (array, possibly empty) to declare ownership.
# Exit with NO output to fall back to the built-in mapping (assign_type in panel.ini).
#
# On error write your error to stderr.
# exit with code 1
# e.g. >&2 echo "Failed listing database users" && exit 1

exit 0
