From 4cf4ae59aefe5733d8cb48ec228bf2174f17c5f2 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Thu, 24 Oct 2019 15:34:09 +0200 Subject: [PATCH] Don't fail if not domain is defined in zmldapsync conf --- zmldapsync/zmldapsync.pl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/zmldapsync/zmldapsync.pl b/zmldapsync/zmldapsync.pl index 6252b80..1c2fbf6 100644 --- a/zmldapsync/zmldapsync.pl +++ b/zmldapsync/zmldapsync.pl @@ -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" );