Include virtual server's databas(es) in `--multiline` or `--simple-multiline` output

I am trying to get to a virtual server's database in custom bash script that knows only virtual server's ID. Using the virtualmin list-domains --id 153950149523357 --simple-multiline or virtualmin list-domains --id 153950149523357 --multiline gives everything, but the database name(s). Is there any way to get to virtual server's database(s) by its ID? If not, could you please consider adding database(s) to --multilines or --simple-multilines output?

Status: 
Active

Comments

Assigned: Unassigned ยป
Joe's picture
Submitted by Joe on Wed, 10/31/2018 - 15:48 Pro Licensee

Would adding an id parameter to the list-databases command work for you? I believe that'd be simpler and safer than adding more fields to list-domains multi-line output.

Would adding an id parameter to the list-databases command work for you? I believe that'd be simpler and safer than adding more fields to list-domains multi-line output.

Any way of getting database(s) knowing only server ID would work for us.

You can convert an ID to a domain name with :

dom=`virtualmin list-domains --id 12345 --name-only`

and then pass $dom to the virtualmin list-databases API command.