app-misc/ollama: create log dir for ollama user in "${ED}"

Fixes build and improves package, because there's no need for Portage to
track and potentially remove individual log files upon package removal.

Fixes: f6b23710f8
Signed-off-by: Lucio Sauer <watermanpaint@posteo.net>
This commit is contained in:
Lucio Sauer
2024-07-12 01:09:59 +02:00
parent 15a625c6fc
commit 5614ba834e
2 changed files with 3 additions and 3 deletions

View File

@@ -7,7 +7,7 @@ command_user="ollama"
command_group="ollama"
command_background="yes"
pidfile="/run/ollama.pid"
log="/var/log/ollama.log"
log="/var/log/ollama/ollama.log"
# Ollama allows cross-origin requests from 127.0.0.1 and 0.0.0.0 by default.
# Additional origins can be configured with OLLAMA_ORIGINS.

View File

@@ -62,8 +62,8 @@ src_install() {
}
pkg_preinst() {
touch /var/log/ollama.log || die
fowners ollama:ollama /var/log/ollama.log
keepdir /var/log/ollama
fowners ollama:ollama /var/log/ollama
}
pkg_postinst() {