[3/3] update.sh: Remove ABUSECH_BOTNETC2 lists from users systems during update.

Message ID 20250220211325.3273650-3-adolf.belka@ipfire.org
State New
Headers
Series [1/3] sources: Remove ABUSECH_BOTNETC2 from ipblocklist sources |

Commit Message

Adolf Belka Feb. 20, 2025, 9:13 p.m. UTC
  - This removes ABUSECH_BOTNETC2 from users system during the update in the same way as
   done previously with ALIENVAULT and SPAMHAUS_EDROP.
- As next is still in CU192 I could not add these lines into the CU193 update.sh so I have
   added it to the CU192 update.sh
- If not appropriate then let me know and when the CU193 is created in next I will redo
   the patch and re-submit it.

Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
---
 config/rootfiles/core/192/update.sh | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
  

Patch

diff --git a/config/rootfiles/core/192/update.sh b/config/rootfiles/core/192/update.sh
index f81857053..d528a190f 100644
--- a/config/rootfiles/core/192/update.sh
+++ b/config/rootfiles/core/192/update.sh
@@ -17,7 +17,7 @@ 
 # along with IPFire; if not, write to the Free Software                    #
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA #
 #                                                                          #
-# Copyright (C) 2024 IPFire-Team <info@ipfire.org>.                        #
+# Copyright (C) 2025 IPFire-Team <info@ipfire.org>.                        #
 #                                                                          #
 ############################################################################
 #
@@ -159,6 +159,13 @@  rm -rvf \
 	/var/log/rrd/collectd/localhost/processes* \
 	/var/log/rrd/collectd/localhost/thermal-cooling_device*
 
+# Remove any entry for ABUSECH_BOTNETC2 from the ipblocklist modified file
+# and the associated ipblocklist files from the /var/lib/ipblocklist directory
+sed -i '/ABUSECH_BOTNETC2=/d' /var/ipfire/ipblocklist/modified
+if [ -e /var/lib/ipblocklist/ABUSECH_BOTNETC2.conf ]; then
+	rm /var/lib/ipblocklist/ABUSECH_BOTNETC2.conf
+fi
+
 # Apply local configuration to sshd_config
 /usr/local/bin/sshctrl