Submitted by yngens on Thu, 08/17/2017 - 23:58
We already have non-virtualmin solution to this problem - by iterating all the servers within domains
- but I thought maybe there is a simpler way. Unfortunately, none of the below commands listed the sub-servers:
virtualmin list-domains --domain parent.tld --subdomain
virtualmin list-domains --domain parent.tld --subserver
virtualmin list-domains --domain parent.tld --parent
virtualmin list-domains --domain parent.tld --toplevel
and generally it is not clear how to use each of them. Documentation pages have no use case examples, unfortunately.
If there is no way to get all the sub-servers with given parent domain, would you consider introducing new feature to virtualmin CLI for this?
Status:
Closed (works as designed)
Comments
I believe this does what you want:
# virtualmin list-domains --parent parent.tld
Holler if that's not what you're after.
It does look like we need more examples in the docs for the CLI. I've added it to my todo list for the docs overhaul that's coming as soon as I get the bugs in the new installer wrapped up.
Submitted by yngens on Fri, 08/18/2017 - 17:44 Comment #2
That's exactly needed command, thanks! But I believe it is confusing - when you put argument
--parent
you imagine it will list parents of a given domain name and not its children.Anyway, it is what it is. But then is there any way to quickly know the parent of a given sub-domain name? In the other thread we discussed non-virtualmin of deriving the parent domain. But maybe there is a Virtualmin command to do so?
Submitted by JamieCameron on Fri, 08/18/2017 - 18:59 Comment #3
You can get the parent domain (and a bunch of other information) by running
virtualmin list-domains --domain example.com --multiline
)Submitted by yngens on Fri, 08/18/2017 - 20:01 Comment #4
Fair enough. We know how to use variables in multiline mode.