From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id B84EB158089 for ; Thu, 9 Nov 2023 17:50:13 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C95DC2BC018; Thu, 9 Nov 2023 17:50:12 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9F0AB2BC018 for ; Thu, 9 Nov 2023 17:50:12 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9BE44335D21 for ; Thu, 9 Nov 2023 17:50:11 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id DC85ED5E for ; Thu, 9 Nov 2023 17:50:09 +0000 (UTC) From: "Benoît Dufour" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Benoît Dufour" Message-ID: <1699552184.0202a52755e64db7c6caae8b6a15feb52bf3b8e1.benoit.dufour@gentoo> Subject: [gentoo-commits] repo/proj/guru:dev commit in: www-apps/whoogle-search/files/, www-apps/whoogle-search/ X-VCS-Repository: repo/proj/guru X-VCS-Files: www-apps/whoogle-search/files/whoogle.initd www-apps/whoogle-search/whoogle-search-0.8.3-r1.ebuild www-apps/whoogle-search/whoogle-search-0.8.3-r2.ebuild www-apps/whoogle-search/whoogle-search-0.8.4-r1.ebuild www-apps/whoogle-search/whoogle-search-0.8.4-r2.ebuild X-VCS-Directories: www-apps/whoogle-search/ www-apps/whoogle-search/files/ X-VCS-Committer: benoit.dufour X-VCS-Committer-Name: Benoît Dufour X-VCS-Revision: 0202a52755e64db7c6caae8b6a15feb52bf3b8e1 X-VCS-Branch: dev Date: Thu, 9 Nov 2023 17:50:09 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: f71eebd5-1e20-49c4-8b83-c18318d1898c X-Archives-Hash: eb7db9d8ada3a67ac81b54fdd6b0391f commit: 0202a52755e64db7c6caae8b6a15feb52bf3b8e1 Author: Benoît Dufour mail com> AuthorDate: Thu Nov 9 17:48:15 2023 +0000 Commit: Benoît Dufour mail com> CommitDate: Thu Nov 9 17:49:44 2023 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=0202a527 www-apps/whoogle-search: Fix the OpenRC init.d file. Signed-off-by: Benoît Dufour mail.com> www-apps/whoogle-search/files/whoogle.initd | 13 ++++++++++++- ...earch-0.8.3-r1.ebuild => whoogle-search-0.8.3-r2.ebuild} | 0 ...earch-0.8.4-r1.ebuild => whoogle-search-0.8.4-r2.ebuild} | 0 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/www-apps/whoogle-search/files/whoogle.initd b/www-apps/whoogle-search/files/whoogle.initd index 7695e805bd..6d51df4ab2 100644 --- a/www-apps/whoogle-search/files/whoogle.initd +++ b/www-apps/whoogle-search/files/whoogle.initd @@ -2,6 +2,11 @@ # Copyright 2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# Environment variables for whoogle +source "/etc/default/whoogle" +export ADDRESS=${BIND_ADDRESS:-0.0.0.0} +export PORT=${LISTEN_PORT:-5000} + name="Whoogle Search" description="A self-hosted, ad-free, privacy-respecting metasearch engine" command="/opt/whoogle-search/run" @@ -17,6 +22,12 @@ depend() { start_pre() { checkpath -fo whoogle:whoogle "/var/log/whoogle.log" - source "/etc/default/whoogle" + echo "Whoogle is running on: ${BIND_ADDRESS}:${LISTEN_PORT}" + cd /opt/whoogle-search } +stop_post() { + # whoogle doesn't get killed by stop so it needs to be done manually + whoogle_pid="$(ps aux | grep -i "/usr/lib/python-exec/python3.11/python3 -um app" | grep -v 'grep' | cut -d ' ' -f 3-4 | xargs)" + kill "${whoogle_pid}" +} diff --git a/www-apps/whoogle-search/whoogle-search-0.8.3-r1.ebuild b/www-apps/whoogle-search/whoogle-search-0.8.3-r2.ebuild similarity index 100% rename from www-apps/whoogle-search/whoogle-search-0.8.3-r1.ebuild rename to www-apps/whoogle-search/whoogle-search-0.8.3-r2.ebuild diff --git a/www-apps/whoogle-search/whoogle-search-0.8.4-r1.ebuild b/www-apps/whoogle-search/whoogle-search-0.8.4-r2.ebuild similarity index 100% rename from www-apps/whoogle-search/whoogle-search-0.8.4-r1.ebuild rename to www-apps/whoogle-search/whoogle-search-0.8.4-r2.ebuild