try {
File domainsDirFile = ok(domainDirParam) ?
new File(domainDirParam) : DomainDirs.getDefaultDomainsDir();
DomainConfig domainConfig = new DomainConfig(null, domainsDirFile.getAbsolutePath());
DomainsManager manager = new PEDomainsManager();
String[] domainsList = manager.listDomains(domainConfig);
programOpts.setInteractive(false); // no prompting for passwords
if (domainsList.length > 0) {
for (String dn : domainsList) {
String status = getStatus(dn);
logger.info(status);