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) {
if (longOpt) {
String headings[] = {"DOMAIN", "ADMIN_HOST", "ADMIN_PORT", "RUNNING", "RESTART_REQUIRED"};
ColumnFormatter cf = header ? new ColumnFormatter(headings) :