aports/community/gitea/gitea.initd
ktprograms 8a8c116a95 community/gitea: fix service not stopping properly
Use SIGTERM for stopping Gitea as SIGINT doesn't get passed properly

Disable reload() because when Gitea receives SIGHUP it forks to the
background, which breaks supervisor daemon.
(See https://github.com/go-gitea/gitea/issues/17976)
2021-12-20 18:10:39 +00:00

24 lines
729 B
Plaintext

#!/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="reload"
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 $?
#}