File tree Expand file tree Collapse file tree 1 file changed +33
-4
lines changed Expand file tree Collapse file tree 1 file changed +33
-4
lines changed Original file line number Diff line number Diff line change 2
2
3
3
DIR=/var/lib/gitea
4
4
USER=git
5
+ HOME=/home/${USER}
6
+ GITEA_WORK_DIR=${DIR}
7
+ EXECUTABLE=/usr/local/bin/gitea
5
8
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"
6
20
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
11
21
12
22
depend ()
13
23
{
14
24
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}"
15
44
}
You can’t perform that action at this time.
0 commit comments