2018-09-27 15:32:25 +02:00
|
|
|
#!/sbin/openrc-run
|
2019-04-02 14:31:11 +02:00
|
|
|
# Copyright 2016-2019 Gentoo Authors
|
2018-09-27 15:32:25 +02:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
|
|
|
description="Gitea, a self-hosted Git service"
|
2019-04-02 14:31:11 +02:00
|
|
|
pidfile=${pidfile:-"/run/${SVCNAME}/${SVCNAME}.pid"}
|
2018-09-27 15:32:25 +02:00
|
|
|
user=${user:-git}
|
|
|
|
group=${group:-git}
|
|
|
|
|
|
|
|
command="/usr/bin/gitea web"
|
|
|
|
command_args="${command_args:--config /var/lib/gitea/conf/app.ini}"
|
|
|
|
command_background="true"
|
|
|
|
start_stop_daemon_args="--user ${user} --group ${group} \
|
2019-04-02 14:31:11 +02:00
|
|
|
-e GITEA_WORK_DIR=${GITEA_WORK_DIR:-/var/lib/gitea} \
|
2019-04-17 04:57:18 +02:00
|
|
|
-e GITEA_CUSTOM=${GITEA_CUSTOM:-/var/lib/gitea/custom} \
|
2018-09-27 15:32:25 +02:00
|
|
|
--stdout /var/log/${SVCNAME}/${SVCNAME}.log \
|
|
|
|
--stderr /var/log/${SVCNAME}/${SVCNAME}.log"
|
|
|
|
|
|
|
|
depend() {
|
|
|
|
need net
|
|
|
|
after net
|
|
|
|
}
|
2019-04-02 14:31:11 +02:00
|
|
|
|
|
|
|
start_pre() {
|
|
|
|
checkpath -d -m 0755 -o "${user}":"${group}" "${pidfile%/*}"
|
|
|
|
}
|