- This patch ensures that any restore from an old backup cointaining the 3coresec lists will not restore the ipblocklist associated files for those lists.
Signed-off-by: Adolf Belka <[email protected]> --- config/backup/backup.pl | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/config/backup/backup.pl b/config/backup/backup.pl index 0cfbd4fc3..b36296ee8 100644 --- a/config/backup/backup.pl +++ b/config/backup/backup.pl @@ -252,11 +252,14 @@ restore_backup() { -out /etc/httpd/server.crt &>/dev/null fi - # Remove any entry for ALIENVAULT, SPAMHAUS_EDROP or ABUSECH_BOTNETC2 from the ipblocklist modified file + # Remove any entry for ALIENVAULT, SPAMHAUS_EDROP, ABUSECH_BOTNETC2 or 3CORESEC 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 + sed -i '/3CORESEC_SSH=/d' /var/ipfire/ipblocklist/modified + sed -i '/3CORESEC_SCAN=/d' /var/ipfire/ipblocklist/modified + sed -i '/3CORESEC_WEB=/d' /var/ipfire/ipblocklist/modified if [ -e /var/lib/ipblocklist/ALIENVAULT.conf ]; then rm /var/lib/ipblocklist/ALIENVAULT.conf fi @@ -266,6 +269,15 @@ restore_backup() { if [ -e /var/lib/ipblocklist/ABUSECH_BOTNETC2.conf ]; then rm /var/lib/ipblocklist/ABUSECH_BOTNETC2.conf fi + if [ -e /var/lib/ipblocklist/3CORESEC_SSH.conf ]; then + rm /var/lib/ipblocklist/3CORESEC_SSH.conf + fi + if [ -e /var/lib/ipblocklist/3CORESEC_SCAN.conf ]; then + rm /var/lib/ipblocklist/3CORESEC_SCAN.conf + fi + if [ -e /var/lib/ipblocklist/3CORESEC_WEB.conf ]; then + rm /var/lib/ipblocklist/3CORESEC_WEB.conf + fi # The collectd directory structure was changed but not all changes # are done by the official migration script generator -- 2.49.0
