From patchwork Thu Feb 20 21:13:24 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adolf Belka X-Patchwork-Id: 8473 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature RSA-PSS (4096 bits)) (Client CN "mail01.haj.ipfire.org", Issuer "R11" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4YzQwd3P10z3x1v for ; Thu, 20 Feb 2025 21:13:37 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) client-signature ECDSA (secp384r1)) (Client CN "mail02.haj.ipfire.org", Issuer "E5" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4YzQwY3j7Sz4Zc; Thu, 20 Feb 2025 21:13:33 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4YzQwY3BG5z33ll; Thu, 20 Feb 2025 21:13:33 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature RSA-PSS (4096 bits)) (Client CN "mail01.haj.ipfire.org", Issuer "R11" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4YzQwV02Vnz2yHY for ; Thu, 20 Feb 2025 21:13:30 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4YzQwT5j29z2S0; Thu, 20 Feb 2025 21:13:29 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1740086009; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ltMJwMU+diLBbbOpQLClLL6iHdT3uOZbsI+OiGhLPDE=; b=YRyxoWRdlzjNkmxOwpmPwItLf5jvcZ8re5EIHyMVI1a+089dKqzsCbqe+5WfyItPLiO+di voQgy2B849Qn6YAw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1740086009; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ltMJwMU+diLBbbOpQLClLL6iHdT3uOZbsI+OiGhLPDE=; b=QIkm1okOQdWTiBA6j+z5euTX7BjUqq6d1MYLl+e2PnY0lO4laC8BP3IaSfdn29D6FIsylA LPxPKwXk6J0pB2D3wMLtG42u+1YCBjYwBS/8KR6RYxxkEgV8W58XW8+6WsXBYiWFVQ+Hmz uWrysLZCUHc1Jg9/T1LOMsc6fB1lfx6uHasBhY6Od8/6igznKukqr59s4eyglujl0kRSrl fVGQH9vReK9RH5Idyh5tuhHGeKEgoaRIL1R1xjNvj44saU82wbrniDevz6nhI2xHX9nWVX f3UqelgFFHGqcOpq4O0iVyj13jnhCULYu8Z4CbVnrEUvwUXYqpWXk6fr62Eniw== From: Adolf Belka 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 Message-ID: <20250220211325.3273650-2-adolf.belka@ipfire.org> In-Reply-To: <20250220211325.3273650-1-adolf.belka@ipfire.org> References: <20250220211325.3273650-1-adolf.belka@ipfire.org> MIME-Version: 1.0 Message-ID-Hash: ZHWHG5GQLAELT55WAV4LWPPCJJSJZBPX X-Message-ID-Hash: ZHWHG5GQLAELT55WAV4LWPPCJJSJZBPX X-MailFrom: adolf.belka@ipfire.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: IPFire development talk Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: - 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 --- 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