From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adolf Belka To: development@lists.ipfire.org Subject: [PATCH] update.sh: Add SPAMHAUS_DROP if SPAMHAUS_EDROP was previously used Date: Sat, 04 May 2024 15:05:20 +0200 Message-ID: <20240504130520.4328-1-adolf.belka@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2174983128417379502==" List-Id: --===============2174983128417379502== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable - I realised that the previous patch for update.sh related to the ipblocklist= removal of ALIENVAULT and SPAMHAUS_EDROP only removed the SPAMHAUS_EDROP setting. = It makes sense to add SPAMHAUS_DROP to the settings file if SPAMHAUS_EDROP was previously= used and SPAMHAUS_DROP was not selected. - This patch adds the above change. Tested-by: Adolf Belka Signed-off-by: Adolf Belka --- config/rootfiles/core/186/update.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/rootfiles/core/186/update.sh b/config/rootfiles/core/186/= update.sh index 444b041a4..5d7add89f 100644 --- a/config/rootfiles/core/186/update.sh +++ b/config/rootfiles/core/186/update.sh @@ -141,6 +141,7 @@ fi =20 # Remove any entry for ALIENVAULT or SPAMHAUS_EDROP from the ipblocklist mod= ified file # and the associated ipblocklist files from the /var/lib/ipblocklist directo= ry +# If SPAMHAUS_EDROP was used and SPAMHAUS_DROP not used then add SPAMHAUS_DR= OP to settings file sed -i '/ALIENVAULT=3D/d' /var/ipfire/ipblocklist/modified sed -i '/SPAMHAUS_EDROP=3D/d' /var/ipfire/ipblocklist/modified if [ -e /var/lib/ipblocklist/ALIENVAULT.conf ]; then @@ -148,6 +149,9 @@ if [ -e /var/lib/ipblocklist/ALIENVAULT.conf ]; then fi if [ -e /var/lib/ipblocklist/SPAMHAUS_EDROP.conf ]; then rm /var/lib/ipblocklist/SPAMHAUS_EDROP.conf + if [ ! -e /var/lib/ipblocklist/SPAMHAUS_DROP.conf ]; then + echo "SPAMHAUS_DROP=3Don" >> /var/ipfire/ipblocklist/settings + fi fi =20 # This update needs a reboot... --=20 2.44.0 --===============2174983128417379502==--