Skip to content
Snippets Groups Projects
Commit 5efaf3a5 authored by Clément OUDOT's avatar Clément OUDOT
Browse files

Improve vhost list action (#LEMONLDAP-649)

git-svn-id: svn://svn.forge.objectweb.org/svnroot/lemonldap/branches/lemonldap-ng_version_1_3-bugfixes@3131 1dbb9719-a921-0410-b57f-c3a383c2c641
parent fd4cca04
No related branches found
No related tags found
No related merge requests found
...@@ -864,19 +864,37 @@ sub vhostSetMaintenance { ...@@ -864,19 +864,37 @@ sub vhostSetMaintenance {
} }
## @method void vhostList () ## @method void vhostList ()
# list all parameters of each vhosts # list all vhosts
# #
# @return nothing # @return nothing
sub vhostList { sub vhostList {
my ($self) = shift; my ($self) = @_;
while ( my ( $vhost, $vhostoptions ) = foreach my $vhost ( sort keys %{ $self->{conf}->{locationRules} } ) {
each %{ $self->{conf}->{vhostOptions} } ) print "- $vhost\n";
{ }
print "- $vhost => "; }
print "Maintenance: $vhostoptions->{vhostMaintenance} | ";
print "Port: $vhostoptions->{vhostPort} | "; ## @method void vhostListOptions ( string vhost )
print "HTTPS: $vhostoptions->{vhostHttps}\n"; # list all options of each vhosts
#
# @return nothing
sub vhostListOptions {
my ( $self, $vhost ) = @_;
unless ($vhost) {
$self->setError( $ERRORS->{TOO_FEW_ARGUMENTS} );
return 0;
}
my $vhostoptions = $self->{conf}->{vhostOptions}->{$vhost};
if ($vhostoptions) {
print "- Maintenance: $vhostoptions->{vhostMaintenance}\n";
print "- Port: $vhostoptions->{vhostPort}\n";
print "- HTTPS: $vhostoptions->{vhostHttps}\n";
}
else {
print "No options defined for $vhost\n";
} }
} }
...@@ -1054,6 +1072,7 @@ Options ...@@ -1054,6 +1072,7 @@ Options
lemonldap-ng-cli vhost-set-port <virtual host> <port> lemonldap-ng-cli vhost-set-port <virtual host> <port>
lemonldap-ng-cli vhost-set-https <virtual host> <value> lemonldap-ng-cli vhost-set-https <virtual host> <value>
lemonldap-ng-cli vhost-set-maintenance <virtual host> <value> lemonldap-ng-cli vhost-set-maintenance <virtual host> <value>
lemonldap-ng-cli vhost-list-options <virtual host>
Sessions Sessions
======== ========
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment