diff -ruN smeserver-affa-3.3.1.old/root/sbin/affa smeserver-affa-3.3.1/root/sbin/affa --- smeserver-affa-3.3.1.old/root/sbin/affa 2021-12-01 10:49:03.264244761 +0000 +++ smeserver-affa-3.3.1/root/sbin/affa 2021-12-01 12:18:36.866259431 +0000 @@ -926,7 +926,7 @@ my @cfgfiles = getConfigFileList(); # only valid ones my @cmd = ( 'echo', '-n', '>', $configfile, ';', 'chmod', '400', $configfile, ';', 'cat' ); foreach my $s (@cfgfiles) { - push( @cmd, $s ); + push( @cmd, '"'.$s.'"' ); } push( @cmd, '>' ); push( @cmd, $configfile ); @@ -1130,10 +1130,23 @@ sub getConfigFileList() { dbg('Fetching list of all config files'); - my @cmd = ( 'find', '/etc/affa/', '-type', 'f', '-name', '"*.conf"' ); - ExecCmd( @cmd, 0 ); - my @ret = (); - my @list = split( /[\r\n]/, $ExecCmdOut ); + + my @dirList = qw (/etc/affa/ /etc/affa/conf.d/); + my @ls = (); + + foreach $dir (@dirList) { + if ( -d $dir ) { + my @cmd = ( + 'find', "$dir", '-maxdepth 1', '-type', 'f', '-name', '"*.conf"' + ); + ExecCmd( @cmd, 0 ); + @ls = split( /[\r\n]/, $ExecCmdOut ); + @list = (@list, @ls); + } + } + + my @ret = (); + foreach my $s (@list) { my $c = Config::IniFiles->new( -file => $s ); if ( not $c ) {