1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-21 02:05:16 +03:00
aports/community/gitea/gitea.initd
psykose 4eecfd4d54 community/gitea: allow sending USR1 to gitea easily
this makes it reopen any logfiles it holds. doesn't do anything with
supervise-daemon logging, but useful for other means

for #12460
2023-02-07 16:42:26 +01:00

29 lines
874 B
Bash

#!/sbin/openrc-run
supervisor=supervise-daemon
name=gitea
command="/usr/bin/gitea"
command_user="${GITEA_USER:-gitea}"
command_args="web --config '${GITEA_CONF:-/etc/gitea/app.ini}'"
supervise_daemon_args="--env GITEA_WORK_DIR='${GITEA_WORK_DIR:-/var/lib/gitea}' --chdir '${GITEA_WORK_DIR:-/var/lib/gitea}' --stdout '${GITEA_LOG_FILE:-/var/log/gitea/http.log}' --stderr '${GITEA_LOG_FILE:-/var/log/gitea/http.log}'"
pidfile="/run/gitea.pid"
extra_started_commands="reopen_log"
depend() {
use logger dns
need net
after firewall mysql postgresql
}
#https://github.com/go-gitea/gitea/issues/17976
#reload() {
# ebegin "Reloading ${RC_SVCNAME}"
# ${supervisor} ${RC_SVCNAME} --signal HUP --pidfile "${pidfile}"
# eend $?
#}
reopen_log() {
ebegin "Reopening logfile for ${RC_SVCNAME}"
${supervisor} ${RC_SVCNAME} --signal USR1 --pidfile "${pidfile}"
eend $?
}