]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
update.sh: Remove existing entries for ALIENVAULT & SPAMHAUS_EDROP
authorAdolf Belka <adolf.belka@ipfire.org>
Fri, 19 Apr 2024 13:39:40 +0000 (15:39 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Fri, 19 Apr 2024 19:51:13 +0000 (19:51 +0000)
- This removes any time entries in the modified file for either ALIENVAULT or
   SPAMHAUS_EDROP.
- This also removes any blocklists for either of these sources from the /var/lib/ipblocklist
   directory.
- This patch will ensure that any reference to either of these sources is removed from the
   ipblocklist files.

Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
config/rootfiles/core/186/update.sh

index 80510b9342ad3066bb071d01c30f718f5a431ad1..33e253804b022e9874c0729f302a2a73237efc8f 100644 (file)
@@ -137,6 +137,17 @@ if [ -e /boot/pakfire-kernel-update ]; then
     /boot/pakfire-kernel-update ${KVER}
 fi
 
+# Remove any entry for ALIENVAULT or SPAMHAUS_EDROP 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
+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
+
 # This update needs a reboot...
 touch /var/run/need_reboot