net-analyzer/gsad: fix OpenRC init script

On first run the log file was created by root and was unwritable to gvm

Signed-off-by: Giuseppe Foti <foti.giuseppe@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/33243
Signed-off-by: Florian Schmaus <flow@gentoo.org>
This commit is contained in:
Giuseppe Foti
2023-10-08 09:05:37 +02:00
committed by Florian Schmaus
parent 83cac9a70c
commit a5dcfd414c
2 changed files with 5 additions and 1 deletions

View File

@@ -3,6 +3,7 @@
# Distributed under the terms of the GNU General Public License v2
: ${GSAD_USER:=gvm}
: ${GSAD_GROUP:=gvm}
: ${GSAD_TIMEOUT:=30}
: ${GSAD_PIDFILE:="/run/gsad/gsad.pid"}
@@ -21,6 +22,10 @@ start_pre() {
checkpath -d --mode 0755 --owner root /run/gsad
}
start_post() {
checkpath -f --mode 0644 --owner "${GSAD_USER}:${GSAD_GROUP}" /var/log/gvm/gsad.log
}
stop_post() {
if [ -f "${GSAD_PIDFILE}" ]; then
ebegin "Removing PID file"
@@ -28,4 +33,3 @@ stop_post() {
eend $?
fi
}