Skip to content

Commit 8e8b536

Browse files
authored
Update OpenRC startup script (#21436)
1 parent bc53256 commit 8e8b536

File tree

1 file changed

+33
-4
lines changed

1 file changed

+33
-4
lines changed

contrib/init/gentoo/gitea

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,43 @@
22

33
DIR=/var/lib/gitea
44
USER=git
5+
HOME=/home/${USER}
6+
GITEA_WORK_DIR=${DIR}
7+
EXECUTABLE=/usr/local/bin/gitea
58

9+
export USER
10+
export HOME
11+
export GITEA_WORK_DIR
12+
13+
name=$RC_SVCNAME
14+
cfgfile="/etc/$RC_SVCNAME/app.ini"
15+
command="${EXECUTABLE}"
16+
command_user="${USER}"
17+
command_args="web -c /etc/$RC_SVCNAME/app.ini"
18+
command_background="yes"
19+
pidfile="/run/$RC_SVCNAME/$RC_SVCNAME.pid"
620
start_stop_daemon_args="--user ${USER} --chdir ${DIR}"
7-
command="/usr/local/bin/gitea"
8-
command_args="web -c /etc/gitea/app.ini"
9-
command_background=yes
10-
pidfile=/run/gitea.pid
1121

1222
depend()
1323
{
1424
need net
25+
###
26+
# Don't forget to add the database service requirements
27+
###
28+
#after postgresql
29+
#after mysql
30+
#after mariadb
31+
#after memcached
32+
#after redis
33+
}
34+
35+
start_pre()
36+
{
37+
checkpath --directory --owner $command_user:$command_user --mode 0750 \
38+
/run/$RC_SVCNAME /var/log/$RC_SVCNAME
39+
##
40+
# If you want to bind Gitea to a port below 1024, uncomment
41+
# the value below
42+
##
43+
#setcap cap_net_bind_service=+ep "${EXECUTABLE}"
1544
}

0 commit comments

Comments
 (0)