public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
From: Adolf Belka <adolf.belka@ipfire.org>
To: development@lists.ipfire.org
Subject: [PATCH 2/3] backup.pl: Remove ABUSECH_BOTNETC2 lists from backup during restore.
Date: Thu, 20 Feb 2025 22:13:24 +0100	[thread overview]
Message-ID: <20250220211325.3273650-2-adolf.belka@ipfire.org> (raw)
In-Reply-To: <20250220211325.3273650-1-adolf.belka@ipfire.org>

[-- Attachment #1: Type: text/plain, Size: 1500 bytes --]

- 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(a)ipfire.org>
---
 config/backup/backup.pl | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/config/backup/backup.pl b/config/backup/backup.pl
index 4f4273d26..1c8c87d0a 100644
--- a/config/backup/backup.pl
+++ b/config/backup/backup.pl
@@ -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
-- 
2.48.1


  reply	other threads:[~2025-02-20 21:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-20 21:13 [PATCH 1/3] sources: Remove ABUSECH_BOTNETC2 from ipblocklist sources Adolf Belka
2025-02-20 21:13 ` Adolf Belka [this message]
2025-02-20 21:13 ` [PATCH 3/3] update.sh: Remove ABUSECH_BOTNETC2 lists from users systems during update Adolf Belka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250220211325.3273650-2-adolf.belka@ipfire.org \
    --to=adolf.belka@ipfire.org \
    --cc=development@lists.ipfire.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox