2018-05-01 12:40:57 +00:00
|
|
|
#!/sbin/openrc-run
|
|
|
|
# Copyright 2016 Gentoo Foundation
|
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
|
|
|
description="Gitea, a self-hosted Git service"
|
|
|
|
pidfile=${pidfile:-"/run/${SVCNAME}/${SVCNAME}.pid"}
|
|
|
|
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} \
|
|
|
|
-e GITEA_CUSTOM=/var/lib/gitea
|
|
|
|
--stdout /var/log/${SVCNAME}/${SVCNAME}.log \
|
|
|
|
--stderr /var/log/${SVCNAME}/${SVCNAME}.log"
|
|
|
|
|
|
|
|
depend() {
|
2018-05-24 17:44:38 +00:00
|
|
|
need net mysql
|
2018-05-01 12:40:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
start_pre() {
|
|
|
|
checkpath -d -m 0755 -o "${user}":"${group}" "${pidfile%/*}"
|
|
|
|
}
|