diff options
Diffstat (limited to 'community/gitea/gitea.initd')
-rw-r--r-- | community/gitea/gitea.initd | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/community/gitea/gitea.initd b/community/gitea/gitea.initd index 78903396c74..dd5af66be0e 100644 --- a/community/gitea/gitea.initd +++ b/community/gitea/gitea.initd @@ -7,22 +7,24 @@ 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" +extra_started_commands="reopen_log" +capabilities="^cap_net_bind_service" depend() { - use logger dns - need net - after firewall mysql postgresql + use logger dns + need net + after firewall mysql postgresql } -stop() { - ebegin "Stopping ${RC_SVCNAME}" - start-stop-daemon --signal INT --pidfile "${pidfile}" - eend $? "Failed to stop ${RC_SVCNAME}" -} +#https://github.com/go-gitea/gitea/issues/17976 +#reload() { +# ebegin "Reloading ${RC_SVCNAME}" +# ${supervisor} ${RC_SVCNAME} --signal HUP --pidfile "${pidfile}" +# eend $? +#} -reload() { - ebegin "Reloading ${RC_SVCNAME}" - start-stop-daemon --signal HUP --pidfile "${pidfile}" +reopen_log() { + ebegin "Reopening logfile for ${RC_SVCNAME}" + ${supervisor} ${RC_SVCNAME} --signal USR1 --pidfile "${pidfile}" eend $? } |