Not all config files are shipped by the rulesets. For example the
"threshold.conf" and the "referneces.conf" are not include in each
ruleset.
Therefore it is not a common way to delete all config files. It is
much safer to simple keep them and overwrite existing ones by the
generated ones.
This reverts commit
a71c3c9dcc60541aa4504d0f1fb0a78c0d58ed5e.
# We only want files.
next unless (-f "$rulespath/$file");
+ # Skip element if it has config as file extension.
+ next if ($file =~ m/\.config$/);
+
# Skip rules file for whitelisted hosts.
next if ("$rulespath/$file" eq $whitelist_file);