mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-08 14:43:27 -04:00
app-accessibility/whisper-cpp: Adding OpenRC init script for whisper-server
Signed-off-by: Kevin Martin <kevinmbecause@gmail.com>
This commit is contained in:
16
app-accessibility/whisper-cpp/files/whisper-cpp.confd
Normal file
16
app-accessibility/whisper-cpp/files/whisper-cpp.confd
Normal file
@@ -0,0 +1,16 @@
|
||||
# model file to use
|
||||
whisper_model="/foo/bar/ggml-base.en.bin"
|
||||
|
||||
# log to syslog
|
||||
# output_logger="logger -t \"$RC_SVCNAME\" -p daemon.info"
|
||||
# error_logger="logger -t \"$RC_SVCNAME\" -p daemon.err"
|
||||
|
||||
# log to file
|
||||
output_log="/var/log/$RC_SVCNAME/$RC_SVCNAME.log"
|
||||
error_log="/var/log/$RC_SVCNAME/$RC_SVCNAME.log"
|
||||
|
||||
# user to run daemon as
|
||||
command_user="whisper"
|
||||
|
||||
# extra options
|
||||
command_args="-t 8 --port 8124"
|
||||
14
app-accessibility/whisper-cpp/files/whisper-cpp.init
Normal file
14
app-accessibility/whisper-cpp/files/whisper-cpp.init
Normal file
@@ -0,0 +1,14 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License, v2
|
||||
|
||||
supervisor=supervise-daemon
|
||||
description="Whisper-CPP Service"
|
||||
command="/usr/bin/whisper-server"
|
||||
command_args+=" -m ${whisper_model}"
|
||||
required_files="${whisper_model}"
|
||||
|
||||
start_pre() {
|
||||
checkpath --directory --owner $command_user --mode 0775 \
|
||||
/var/log/$RC_SVCNAME
|
||||
}
|
||||
@@ -47,3 +47,10 @@ src_configure() {
|
||||
)
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake_src_install
|
||||
|
||||
newinitd "${FILESDIR}/${PN}.init" "${PN}"
|
||||
newconfd "${FILESDIR}/${PN}.confd" "${PN}"
|
||||
}
|
||||
Reference in New Issue
Block a user