From patchwork Tue Sep 26 14:07:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adolf Belka X-Patchwork-Id: 7260 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature ECDSA (secp384r1)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4Rw1lL4mrLz3wtY for ; Tue, 26 Sep 2023 14:07:10 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature ECDSA (secp384r1)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4Rw1lG5RQkz3sS; Tue, 26 Sep 2023 14:07:06 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4Rw1lG2Gm0z2yvr; Tue, 26 Sep 2023 14:07:06 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4Rw1lD7366z2y4Q for ; Tue, 26 Sep 2023 14:07:04 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4Rw1lD5dYlz2SG; Tue, 26 Sep 2023 14:07:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1695737224; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4HMRYcia0TFTokIB/IVhNBC8THRKtA2SHPJzGPs6wMQ=; b=fOY6P6oZGZBonOX9mTbpQl5EZgzI3smilIGbWkMxIAYlRQZmOVs7fyRlyuwew1epbiDQ6r FXUcYmmOisdweAKDl1lZNjoj3OjOUzt96Avv4GgwM919fC/J+8q/X3StzvVKq7PlOum/t/ ktKEhkCwuvGXWV0Iz9gMeeKGsrgVS/feThtWbNWBTUtJApm9CPPncOQfUCMvfIRWIWoQDb JqOUacqMsNzyyts/tejYmID4S6XCqYdG/BetyiNxsxBdQOdBcjocvJHhwP7YLou0sPrqHN CsFY2JNil40texAdfj5bGvbvIOc9H0TyrBko7GTtEgDZeFUJGAGgRJV3siNvRw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1695737224; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4HMRYcia0TFTokIB/IVhNBC8THRKtA2SHPJzGPs6wMQ=; b=oZlRKwuECMYWwuT33QIGPjOXe0hdI6JXQOdkMWPfJQvkGI+f/IYSLi4HTrkMNFvH2k9Ibn f8INBzCfVy0LdzBQ== From: Adolf Belka To: development@lists.ipfire.org Subject: [PATCH 2/2] urlfilter.cgi: Fixes bug#10649 - calls urlfilterctrl with remove option if update disabled Date: Tue, 26 Sep 2023 16:07:01 +0200 Message-ID: <20230926140701.3438340-2-adolf.belka@ipfire.org> In-Reply-To: <20230926140701.3438340-1-adolf.belka@ipfire.org> References: <20230926140701.3438340-1-adolf.belka@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" - When the url filter update enable checkbox is unchecked then this patch calls urlfilterctrl with the remove option added in the otrher patch of this series. - Tested on my vm testbed that this change does remove the urlfilter symlink from the fcron directories when the update is disabled. Fixes: Bug#10649 Tested-by: Adolf Belka Signed-off-by: Adolf Belka --- html/cgi-bin/urlfilter.cgi | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/html/cgi-bin/urlfilter.cgi b/html/cgi-bin/urlfilter.cgi index 1e54372f1..1ced06e26 100644 --- a/html/cgi-bin/urlfilter.cgi +++ b/html/cgi-bin/urlfilter.cgi @@ -982,6 +982,11 @@ if ($filtersettings{'ACTION'} eq $Lang::tr{'urlfilter save schedule'}) { &General::system('/usr/local/bin/urlfilterctrl', 'cron', 'monthly'); } + + if ($filtersettings{'ENABLE_AUTOUPDATE'} eq 'off') + { + &General::system('/usr/local/bin/urlfilterctrl', 'cron', 'remove'); + } } }