# Main settings file.
our $settings_file = "$settings_dir/settings";
+# Location where the raw blocklists are stored.
+our $blocklist_cache_dir = "/var/cache/ipblocklist";
+
# Location where the blocklists in ipset compatible format are stored.
our $blocklist_dir = "/var/lib/ipblocklist";
-# File extension of the blocklist files.
-my $blocklist_file_extension = ".conf";
-
# File to store Etags.
our $etags_file = "$settings_dir/etags";
}
#
-## Tiny function to get the full path and name of a given blocklist.
+## Function to get the full path and name of the cached blocklist.
#
-sub get_ipset_db_file($) {
- my ($set) = @_;
+sub get_cached_blocklist_file ($) {
+ my ($list) = @_;
- # Generate the
- my $file = "$blocklist_dir/$set$blocklist_file_extension";
+ # Generate the file name and full path, based on the given list.
+ my $file = "$blocklist_cache_dir/$list$cached_blocklist_file_extension";
# Return the file name.
return $file;