]> git.ipfire.org Git - people/ms/ipfire-2.x.git/commitdiff
backup.pl: Remove ABUSECH_BOTNETC2 lists from backup during restore.
authorAdolf Belka <adolf.belka@ipfire.org>
Thu, 20 Feb 2025 21:13:24 +0000 (22:13 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 22 Feb 2025 13:59:19 +0000 (13:59 +0000)
- This removes ABUSECH_BOTNETC2 from any backup during a restore in the same way as done
   previously with ALIENVAULT and SPAMHAUS_EDROP.

Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/backup/backup.pl

index 4f4273d2692208acd0253b6cae9f15ba9818e04d..1c8c87d0a9242a3946c609dd2e276d8456cbe4b4 100644 (file)
@@ -252,16 +252,20 @@ restore_backup() {
                        -out /etc/httpd/server.crt &>/dev/null
        fi
 
-       # Remove any entry for ALIENVAULT or SPAMHAUS_EDROP from the ipblocklist modified file
+       # Remove any entry for ALIENVAULT, SPAMHAUS_EDROP or ABUSECH_BOTNETC2 from the ipblocklist modified file
        # and the associated ipblocklist files from the /var/lib/ipblocklist directory
        sed -i '/ALIENVAULT=/d' /var/ipfire/ipblocklist/modified
        sed -i '/SPAMHAUS_EDROP=/d' /var/ipfire/ipblocklist/modified
+       sed -i '/ABUSECH_BOTNETC2=/d' /var/ipfire/ipblocklist/modified
        if [ -e /var/lib/ipblocklist/ALIENVAULT.conf ]; then
                rm /var/lib/ipblocklist/ALIENVAULT.conf
        fi
        if [ -e /var/lib/ipblocklist/SPAMHAUS_EDROP.conf ]; then
                rm /var/lib/ipblocklist/SPAMHAUS_EDROP.conf
        fi
+       if [ -e /var/lib/ipblocklist/ABUSECH_BOTNETC2.conf ]; then
+               rm /var/lib/ipblocklist/ABUSECH_BOTNETC2.conf
+       fi
 
        # The collectd directory structure was changed but not all changes
        # are done by the official migration script generator