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

Signed-off-by: Benoît Dufour <benoit.dufour@mail.com>
This commit is contained in:
Benoît Dufour
2023-11-08 00:30:49 -05:00
parent 1bd308a811
commit 6b3df210e6
3 changed files with 24 additions and 0 deletions

View File

@@ -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"
}

View File

@@ -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
}

View File

@@ -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
}