#!/bin/bash
# Lists database names owned by the given linux account for the specified engine.
# Used during backup discovery to determine which databases 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 names (in the first line of the output).
# exit with code 0
# e.g.
# ["bob_app","bob_blog"]
#
# 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 databases" && exit 1

exit 0
