[2/3] backup.pl: Remove ABUSECH_BOTNETC2 lists from backup during restore.
Commit Message
- 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@ipfire.org>
---
config/backup/backup.pl | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
@@ -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