nemunaire-overlay/www-apps/gitea/files/gitea.initd-r2

25 lines
676 B
Plaintext
Raw Normal View History

#!/sbin/openrc-run
# Copyright 2016-2019 Gentoo Authors
# 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="--config ${GITEA_CONFIG:-/etc/gitea/app.ini} ${GITEA_OPTS}"
command_background="true"
start_stop_daemon_args="--user ${user} --group ${group} \
-e GITEA_WORK_DIR=${GITEA_WORK_DIR:-/var/lib/gitea} \
-e GITEA_CUSTOM=${GITEA_CUSTOM:-/var/lib/gitea/custom}"
depend() {
need net
after net
}
start_pre() {
checkpath -d -m 0755 -o "${user}":"${group}" "${pidfile%/*}"
}