commit:     6b3df210e63e52967ad07750ab19a7da6a55c4d9
Author:     Benoît Dufour <benoit.dufour <AT> mail <DOT> com>
AuthorDate: Wed Nov  8 05:30:49 2023 +0000
Commit:     Benoît Dufour <benoit.dufour <AT> mail <DOT> com>
CommitDate: Wed Nov  8 05:30:49 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=6b3df210

www-apps/whoogle-search: Adds an initd file for OpenRC. Git Gud SystemD.

Signed-off-by: Benoît Dufour <benoit.dufour <AT> mail.com>

 www-apps/whoogle-search/files/whoogle.initd        | 22 ++++++++++++++++++++++
 ...0.8.3.ebuild => whoogle-search-0.8.3-r1.ebuild} |  1 +
 ...0.8.4.ebuild => whoogle-search-0.8.4-r1.ebuild} |  1 +
 3 files changed, 24 insertions(+)

diff --git a/www-apps/whoogle-search/files/whoogle.initd 
b/www-apps/whoogle-search/files/whoogle.initd
new file mode 100644
index 0000000000..7695e805bd
--- /dev/null
+++ b/www-apps/whoogle-search/files/whoogle.initd
@@ -0,0 +1,22 @@
+#!/sbin/openrc-run
+# Copyright 2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+name="Whoogle Search"
+description="A self-hosted, ad-free, privacy-respecting metasearch engine"
+command="/opt/whoogle-search/run"
+command_user="whoogle:whoogle"
+command_background=1
+pidfile="/run/whoogle.pid"
+output_log="/var/log/whoogle.log"
+error_log="${output_log}"
+
+depend() {
+       use logger net
+}
+
+start_pre() {
+       checkpath -fo whoogle:whoogle "/var/log/whoogle.log"
+       source "/etc/default/whoogle"
+}
+

diff --git a/www-apps/whoogle-search/whoogle-search-0.8.3.ebuild 
b/www-apps/whoogle-search/whoogle-search-0.8.3-r1.ebuild
similarity index 96%
rename from www-apps/whoogle-search/whoogle-search-0.8.3.ebuild
rename to www-apps/whoogle-search/whoogle-search-0.8.3-r1.ebuild
index 3ee914a883..61b960703a 100644
--- a/www-apps/whoogle-search/whoogle-search-0.8.3.ebuild
+++ b/www-apps/whoogle-search/whoogle-search-0.8.3-r1.ebuild
@@ -43,5 +43,6 @@ src_install() {
     insinto /usr/lib/sysusers.d/
     doins ${FILESDIR}/whoogle.conf
 
+    newinitd "${FILESDIR}"/whoogle.initd whoogle
     systemd_dounit ${FILESDIR}/whoogle.service
 }
\ No newline at end of file

diff --git a/www-apps/whoogle-search/whoogle-search-0.8.4.ebuild 
b/www-apps/whoogle-search/whoogle-search-0.8.4-r1.ebuild
similarity index 96%
rename from www-apps/whoogle-search/whoogle-search-0.8.4.ebuild
rename to www-apps/whoogle-search/whoogle-search-0.8.4-r1.ebuild
index c419bbdc77..40c26760ef 100644
--- a/www-apps/whoogle-search/whoogle-search-0.8.4.ebuild
+++ b/www-apps/whoogle-search/whoogle-search-0.8.4-r1.ebuild
@@ -44,5 +44,6 @@ src_install() {
     insinto /usr/lib/sysusers.d/
     doins ${FILESDIR}/whoogle.conf
 
+    newinitd "${FILESDIR}"/whoogle.initd whoogle
     systemd_dounit ${FILESDIR}/whoogle.service
 }

Reply via email to