From patchwork Tue Oct 11 22:01:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Roevens X-Patchwork-Id: 6053 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 (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4Mn8tS6sP5z3wgL for ; Tue, 11 Oct 2022 22:03:28 +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 (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4Mn8tP05hBz1gg; Tue, 11 Oct 2022 22:03:25 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4Mn8tN5qFHz2yrV; Tue, 11 Oct 2022 22:03:24 +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) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4Mn8tL5vHrz2xfn for ; Tue, 11 Oct 2022 22:03:22 +0000 (UTC) Received: from knopi.disroot.org (knopi.disroot.org [178.21.23.139]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPS id 4Mn8tK4v7Gzyn for ; Tue, 11 Oct 2022 22:03:21 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 246B04DAF4 for ; Wed, 12 Oct 2022 00:03:20 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with UTF8SMTP id 2txdvFuDDzPg for ; Wed, 12 Oct 2022 00:03:19 +0200 (CEST) Received: from chojin.sicho.home (amaterasu.sicho.home [192.168.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (no client certificate requested) (Authenticated sender) by hachiman (MailScanner Milter) with SMTP id 11A53751FD; Wed, 12 Oct 2022 00:02:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1665525746; bh=dfD7zCVtF77vM74ZurVdNigaK99kVMjR5o/weXTB8fg=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=l3jyIgneAtiBh+0DjXmbdDnN1worEHdbiFRwNXSxHm88ba49VCgDesQBSiu0ryQye EppBlae7Si22lHsLI7xCmBw/j3rKZWc8xfqc9PBvBtHRXkX6kzLqgHpqc7Wnwd9tFc ufW1C2VCxvQbFg+mL7CDQqSIlwqI5+T/cfOGkU5kbF6Pg9tvY7UTGutUjI9gIdWCYD Vh+ACYqNC6r0axkaHHHzn/jbpsCdtpxflLUUEWuOugkw4aQZW8v1fcgYF8AJOyeKev UNZ5mxeTfqFIeP0F5BV95MDuzhpgY7nSrCLeLyZMoX3dEGUc+rCA6x/FzPXOJxfjcI 3Xb59+MFUxAHg== From: Robin Roevens To: development@lists.ipfire.org Subject: [PATCH v3 5/5] services.cgi: add link to addon config if ui exists for it Date: Wed, 12 Oct 2022 00:01:57 +0200 Message-Id: <20221011220157.17385-6-robin.roevens@disroot.org> In-Reply-To: <20221011220157.17385-1-robin.roevens@disroot.org> References: <20221011220157.17385-1-robin.roevens@disroot.org> Mime-Version: 1.0 X-sicho-MailScanner-ID: 11A53751FD.A8A80 X-sicho-MailScanner: Found to be clean X-sicho-MailScanner-From: robin.roevens@disroot.org X-sicho-MailScanner-Watermark: 1666130530.88704@5siYQs3ni2+1f7AHBEm8wQ ARC-Seal: i=1; s=202003rsa; d=lists.ipfire.org; t=1665525801; a=rsa-sha256; cv=none; b=Xh/Fk8dVhNS5Nv2cUx9xeBTJNHrabSjT7z3oeAs5oo7LXcqg9AyIbgbxEE+qnx06C+M8jV UO+e/CFplBnyQchaNuTwqNbABP3YMBl5DCuPhMAruPZUS4z3oa7ulwUjjclu3dibWpbD7y zZ9iPZqgZT5+5hokGR7ww83Hb7wa0XeZe72k8ve/PYFVV1vQjbtaD5uTuk3Dw4UNhoWzo/ l5Wj2JndVqaTOHoZR7gkPFf9tn9yLPhDi9/0c87Wg8uhQe+F6MtCUvPd4uRzW19y+cxJFB HaDvMSRSINUHnw2r3h05XsSwA9ISJjsmbYwk+R/KbnGxbTjAdoQHVHF7o78wvg== ARC-Authentication-Results: i=1; mail01.ipfire.org; dkim=pass header.d=disroot.org header.s=mail header.b=l3jyIgne; spf=pass (mail01.ipfire.org: domain of robin.roevens@disroot.org designates 178.21.23.139 as permitted sender) smtp.mailfrom=robin.roevens@disroot.org; dmarc=pass (policy=quarantine) header.from=disroot.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=lists.ipfire.org; s=202003rsa; t=1665525801; 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:dkim-signature; bh=G9YnD2y3kDrDXmCNmhWrnFpcknqM6D2HqhXaGVvKHmY=; b=xpbF1/qmE8b2ecyh/I2i3ek2JIDmYRiavue3AM8qvEOf18wn5KRNzvoJukj+Qn8BFoDzAB BhzlDyUjWERSxxXiS3/a4IhIHKWqb+ENp/V9If8Dy+v8lIbXcnHeRZX7NoM1nML/13iw8a t7+zUaMtZSHXOmMlDJbDfDZF4ms/AJoQGLsy+4+RMLnQLIx5LMgqvbSaL+HunZCnHMgxU6 vs7IHzlf2bAHNI29MeG8ws9vQpVQdWdI6LG9SMTE4Kdg+du3R7Ogk6TlVWrOjnZetjHIdC uYKvFhdspxvsA65XC6qXzGASwZ/D08DdkVg4ebaDZaYtxSptN6I8Mc1GsuaAfA== Authentication-Results: mail01.ipfire.org; dkim=pass header.d=disroot.org header.s=mail header.b=l3jyIgne; spf=pass (mail01.ipfire.org: domain of robin.roevens@disroot.org designates 178.21.23.139 as permitted sender) smtp.mailfrom=robin.roevens@disroot.org; dmarc=pass (policy=quarantine) header.from=disroot.org X-Rspamd-Server: mail01.haj.ipfire.org X-Spamd-Result: default: False [-5.12 / 11.00]; BAYES_HAM(-3.00)[99.99%]; IP_REPUTATION_HAM(-1.14)[asn: 50673(-0.32), country: NL(-0.01), ip: 178.21.23.139(-0.81)]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM(-1.00)[-1.000]; DKIM_REPUTATION(-0.82)[-0.82134715129011]; SPF_REPUTATION_HAM(-0.61)[-0.61440594065069]; MV_CASE(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[disroot.org,quarantine]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(0.27)[disroot.org:s=mail]; R_SPF_ALLOW(-0.20)[+a]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; ARC_NA(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[development@lists.ipfire.org]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; ARC_SIGNED(0.00)[lists.ipfire.org:s=202003rsa:i=1]; ASN(0.00)[asn:50673, ipnet:178.21.23.0/24, country:NL]; DKIM_TRACE(0.00)[disroot.org:+]; MIME_TRACE(0.00)[0:+]; RCPT_COUNT_TWO(0.00)[2]; TO_DN_SOME(0.00)[] X-Rspamd-Queue-Id: 4Mn8tK4v7Gzyn 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" * If a cgi file exists with the same name as an addon, the displayed service will be a link to that cgi file. Signed-off-by: Robin Roevens Reviewed-by: Michael Tremer --- html/cgi-bin/services.cgi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/html/cgi-bin/services.cgi b/html/cgi-bin/services.cgi index 4b379251e..14ed01c50 100644 --- a/html/cgi-bin/services.cgi +++ b/html/cgi-bin/services.cgi @@ -192,6 +192,10 @@ END # Add addon name to displayname of service if servicename differs from addon my $displayname = ($pak ne $service) ? "$service ($pak)" : $service; + if ( -e "/srv/web/ipfire/cgi-bin/$pak.cgi" ) { + $displayname = ($pak ne $service) ? "$service ($pak)" : "$service"; + } + print "$displayname "; my $status = isautorun($pak,$service,$col);