From ade495e55a1996d447049d6a550ac315656a251e Mon Sep 17 00:00:00 2001 From: Stefan Schantl Date: Fri, 14 Apr 2023 17:25:46 +0200 Subject: [PATCH] ipblocklist-functions.pl: Switch to get_cached_blocklist_file() Replace the get_ipset_db_file() function to get_cache_blocklist_file(). This function will return the filename of the cached blocklist file in "/var/cache/ipblocklist/". Signed-off-by: Stefan Schantl --- config/cfgroot/ipblocklist-functions.pl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/config/cfgroot/ipblocklist-functions.pl b/config/cfgroot/ipblocklist-functions.pl index b293f7098e..1163d087b7 100644 --- a/config/cfgroot/ipblocklist-functions.pl +++ b/config/cfgroot/ipblocklist-functions.pl @@ -32,12 +32,12 @@ our $settings_dir = "/var/ipfire/ipblocklist"; # 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"; @@ -70,13 +70,13 @@ sub get_blocklists () { } # -## 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; -- 2.39.5