virtualmin list-domains --domain $DOMAIN fails

Hi All,

For some reason the command “virtualmin list-domains --domain <>” stopped working on my system.
What’s strange is that “virtualmin list-domains” works fine, lists all the domains, including

I’m doing this as root, and the system has been working for the last few years ok… any ideas?


I see the problem now, in /etc/webmin/virtual-server all the map.* files are zero bytes. How do I regenerate those?

OK, I added a build_domain_maps command by creating /usr/share/webmin/virtual-server/
with the following guts :

package virtual_server;
if (!$module_name) {
$ENV{‘WEBMIN_CONFIG’} ||= “/etc/webmin”;
$ENV{‘WEBMIN_VAR’} ||= “/var/webmin”;
if ($0 =~ /^(.*)/[^/]+$/) {
chdir($pwd = $1);
else {
chop($pwd = pwd);
$0 = “$pwd/”;
require ‘./’;
$< == 0 || die “ must be run as root”;

This is mostly a copy-paste of the file. Then I run a code +x, and finally I could run that command as virtualmin build_domain_maps as root. Everything appears be back in business now.