diff options
-rwxr-xr-x | fripost-searchdomain | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/fripost-searchdomain b/fripost-searchdomain index 1507fea..cfd00ed 100755 --- a/fripost-searchdomain +++ b/fripost-searchdomain @@ -120,17 +120,11 @@ $domain{domain} = $ARGV[0] if defined $ARGV[0]; $domain{owner} = $ARGV[1] if defined $ARGV[1]; foreach my $domain ($ldap->domain->search( \%domain )->entries) { - say "Domain: " . $domain->{domain}; - print "Owner: "; - my $owners = $domain->{owner}; - if (defined $owners) { - say (join ', ', @$owners); - } - else { - say "(none)"; - } - say "IsActive: " . $domain->{isActive}; - say "--------------------------------" + say '' . ($domain->{isActive} ? 'ACTIVE' : 'INACTIVE') + . ' domain ' . $domain->{domain} + . ' owned by ' + . (defined $domain->{owner} ? join ', ', @{$domain->{owner}} + : '(none)'); } $ldap->unbind(); |