]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
update.sh: Core195 - remove any 3coresec ipblocklists during Core Update
authorAdolf Belka <adolf.belka@ipfire.org>
Thu, 24 Apr 2025 14:20:40 +0000 (16:20 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 24 Apr 2025 14:53:21 +0000 (14:53 +0000)
- This ensures that any existing 3coresec blocklists that might have been selected
   when they existed will be removed from users systems.

Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/rootfiles/core/195/update.sh

index 1895513b1f0758f53ad3efcc6b07f3e75e57b239..cc9a05aadab5a17a088d779dcc6376e55c8af94f 100644 (file)
@@ -53,6 +53,21 @@ fi
 # Filesytem cleanup
 /usr/local/bin/filesystem-cleanup
 
+# Remove any entry for 3CORESEC_SSH, 3CORESEC_SCAN or 3CORESEC_WEB from the ipblocklist modified file
+# and the associated ipblocklist files from the /var/lib/ipblocklist directory
+sed -i '/3CORESEC_SSH=/d' /var/ipfire/ipblocklist/modified
+if [ -e /var/lib/ipblocklist/3CORESEC_SSH.conf ]; then
+       rm /var/lib/ipblocklist/3CORESEC_SSH.conf
+fi
+sed -i '/3CORESEC_SCAN=/d' /var/ipfire/ipblocklist/modified
+if [ -e /var/lib/ipblocklist/3CORESEC_SCAN.conf ]; then
+       rm /var/lib/ipblocklist/3CORESEC_SCAN.conf
+fi
+sed -i '/3CORESEC_WEB=/d' /var/ipfire/ipblocklist/modified
+if [ -e /var/lib/ipblocklist/3CORESEC_WEB.conf ]; then
+       rm /var/lib/ipblocklist/3CORESEC_WEB.conf
+fi
+
 # Start services
 /etc/init.d/firewall restart