Don't fail if not domain is defined in zmldapsync conf

This commit is contained in:
Daniel Berteaud 2019-10-24 15:34:09 +02:00
parent 84b4dc745e
commit 4cf4ae59ae
1 changed files with 5 additions and 0 deletions

View File

@ -72,6 +72,11 @@ my $uuid = Data::UUID->new();
my $exit = 0;
my $err = '';
if (not defined $conf->{domains} or ref $conf->{domains} ne 'HASH'){
print "No domain configured for LDAP sync, nothing to do\n";
exit (0);
}
DOMAIN: foreach my $domain ( keys $conf->{domains} ) {
log_verbose( "Start to process domain $domain" );