From patchwork Thu Oct 6 17:59:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Roevens X-Patchwork-Id: 6041 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 4MjzwB70Tbz3wg5 for ; Thu, 6 Oct 2022 18:08:58 +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 4Mjzw725yrz1WS; Thu, 6 Oct 2022 18:08:55 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4Mjzw708Nzz2yp1; Thu, 6 Oct 2022 18:08:55 +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 4Mjzw51NVKz2xR4 for ; Thu, 6 Oct 2022 18:08:53 +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 4Mjzw42X7Wz1GW for ; Thu, 6 Oct 2022 18:08:52 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 099954CA87 for ; Thu, 6 Oct 2022 20:08:52 +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 2nEJoH609Q4E for ; Thu, 6 Oct 2022 20:08:51 +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 1D7A473545; Thu, 6 Oct 2022 20:00:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1665079223; bh=dfD7zCVtF77vM74ZurVdNigaK99kVMjR5o/weXTB8fg=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ajKHICakM9NK7gaRzuD2bFK5gRO4qyWFHckIv1EXd9+Ka1KMq5WUbl6eqCs0JRbqV cureGZkI92EaqGDCnFc2mUv2Pi+8BTT9j+7treMasGvely0o3Oyh9BTr02YHOPby8h KGeggYV1kic7PYQDn832QtugBcYqBRRVhhg+2n1BXDoBF3YrBtBjtbQqxlXoyqcef5 e5shJ74v8keb/C/wJ8JniKte7U/j1pVF0UJUrLuEZHgKrmiB4VDrMkhZ40P7HsyBYn 6YSS9ippM6hSYtJdMWWsYkO+pa1BpnFHP9biOCJj5m3qrJmfWlX44/lPpvow08N5lK i/TS7zVnMhRDA== From: Robin Roevens To: development@lists.ipfire.org Subject: [PATCH v2 5/5] services.cgi: add link to addon config if ui exists for it Date: Thu, 6 Oct 2022 19:59:58 +0200 Message-Id: <20221006175958.11036-6-robin.roevens@disroot.org> In-Reply-To: <20221006175958.11036-1-robin.roevens@disroot.org> References: <20221006175958.11036-1-robin.roevens@disroot.org> Mime-Version: 1.0 X-sicho-MailScanner-ID: 1D7A473545.A8A80 X-sicho-MailScanner: Found to be clean X-sicho-MailScanner-From: robin.roevens@disroot.org X-sicho-MailScanner-Watermark: 1665684008.78561@PIS90UGz+x8ss15+org15w ARC-Seal: i=1; s=202003rsa; d=lists.ipfire.org; t=1665079732; a=rsa-sha256; cv=none; b=dZbeejLWEQxV/+yAVr8cclS+3QTjPqUZhdOi5pm7DUCBjWGjeud6t+8nKaZqbCeOfQ0UyO bKSJkDRsn47Zt5yoOsk3Y9Mk9/CUqBp9cDXQtepb0Sof0K5mhhLJpNxLLqe8WVge13Uoge fcujyH5CghuIcCYVesEV/fxiy5SCL6CPV1X8jN39id1uKysDF3q7vJWYFwKtd3Tc7dkisl CdqV+Gzls7BaHY02wcvSFY71kXA+6Tv/04/BKx4g/K8LKjgcPg/p/PY5MCwQrn/njNbBdU hNNxVUo4EcCagA9wQxVv7fld5iniIespWSBQZT0I5Ve+aIzgY2ilWakhAoRXNA== ARC-Authentication-Results: i=1; mail01.ipfire.org; dkim=pass header.d=disroot.org header.s=mail header.b=ajKHICak; 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=1665079732; 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=dmf24g3N3joim91QygBSs3fFmkeIpMulPzi8MwJxOx2i8+kZL08ymrRMx2BCDQsS3ZEIcx 6hm90Q0mQhP9DFW3+MN+2TUILSBqgJ661/Yvn+lcECkXFk4ABQbKd0VLS8xCydDVsCDVg/ 9f0UkddAw5RdLGX+gd927K4Km9MaOpx47XylWTwRsXCC4RyFo1BOyUjh0cI0eGfu1Q8VLa NhKFmi6kL30nXCbfavUIycTHigcYmGEydxuu5gOscz5jLR29vxN4iVGY1Y59x7E88cBAMn EHrUawBwbbqLGHCNcCq1BTEs7Bvpk5L6RQvCZ6PqanclFBsknjKSOUDmzvffcg== Authentication-Results: mail01.ipfire.org; dkim=pass header.d=disroot.org header.s=mail header.b=ajKHICak; 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.11 / 11.00]; BAYES_HAM(-2.99)[99.96%]; IP_REPUTATION_HAM(-1.10)[asn: 50673(-0.31), country: NL(-0.01), ip: 178.21.23.139(-0.78)]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM(-1.00)[-1.000]; DKIM_REPUTATION(-0.79)[-0.78955115065407]; SPF_REPUTATION_HAM(-0.68)[-0.67900099170085]; DMARC_POLICY_ALLOW(-0.50)[disroot.org,quarantine]; R_MISSING_CHARSET(0.50)[]; MV_CASE(0.50)[]; R_DKIM_ALLOW(0.26)[disroot.org:s=mail]; R_SPF_ALLOW(-0.20)[+a:c]; 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: 4Mjzw42X7Wz1GW 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: Bernhard Bitsch --- 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);