File tree Expand file tree Collapse file tree 10 files changed +100
-100
lines changed Expand file tree Collapse file tree 10 files changed +100
-100
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
2
#
3
- # /etc/rc.d/init.d/gogs
3
+ # /etc/rc.d/init.d/gitea
4
4
#
5
5
# Runs the Gogs Go Git Service.
6
6
#
9
9
#
10
10
11
11
# ## BEGIN INIT INFO
12
- # Provides: gogs
12
+ # Provides: gitea
13
13
# Required-Start: $remote_fs $syslog
14
14
# Required-Stop: $remote_fs $syslog
15
15
# Default-Start: 2 3 4 5
16
16
# Default-Stop: 0 1 6
17
- # Short-Description: Start gogs at boot time.
18
- # Description: Control gogs .
17
+ # Short-Description: Start gitea at boot time.
18
+ # Description: Control gitea .
19
19
# ## END INIT INFO
20
20
21
21
# Source function library.
22
22
. /etc/init.d/functions
23
23
24
24
# Default values
25
25
26
- NAME=gogs
27
- GITEA_HOME=/home/git/gogs
26
+ NAME=gitea
27
+ GITEA_HOME=/home/git/gitea
28
28
GITEA_PATH=${GITEA_HOME} /$NAME
29
29
GITEA_USER=git
30
30
SERVICENAME=" Gogs Go Git Service"
31
- LOCKFILE=/var/lock/subsys/gogs
31
+ LOCKFILE=/var/lock/subsys/gitea
32
32
LOGPATH=${GITEA_HOME} /log
33
- LOGFILE=${LOGPATH} /gogs .log
33
+ LOGFILE=${LOGPATH} /gitea .log
34
34
RETVAL=0
35
35
36
- # Read configuration from /etc/sysconfig/gogs to override defaults
36
+ # Read configuration from /etc/sysconfig/gitea to override defaults
37
37
[ -r /etc/sysconfig/$NAME ] && . /etc/sysconfig/$NAME
38
38
39
39
# Don't do anything if nothing is installed
Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
2
# ## BEGIN INIT INFO
3
- # Provides: gogs
3
+ # Provides: gitea
4
4
# Required-Start: $syslog $network
5
5
# Required-Stop: $syslog
6
6
# Default-Start: 2 3 4 5
16
16
# PATH should only include /usr/* if it runs after the mountnfs.sh script
17
17
PATH=/sbin:/usr/sbin:/bin:/usr/bin
18
18
DESC=" Go Git Service"
19
- NAME=gogs
19
+ NAME=gitea
20
20
SERVICEVERBOSE=yes
21
21
PIDFILE=/var/run/$NAME .pid
22
22
SCRIPTNAME=/etc/init.d/$NAME
23
- WORKINGDIR=/home/git/gogs
23
+ WORKINGDIR=/home/git/gitea
24
24
DAEMON=$WORKINGDIR /$NAME
25
25
DAEMON_ARGS=" web"
26
26
USER=git
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ #
3
+ # $FreeBSD$
4
+ #
5
+ # PROVIDE: gitea
6
+ # REQUIRE: NETWORKING SYSLOG
7
+ # KEYWORD: shutdown
8
+ #
9
+ # Add the following lines to /etc/rc.conf to enable gitea:
10
+ #
11
+ # gitea_enable="YES"
12
+
13
+ . /etc/rc.subr
14
+
15
+ name=" gitea"
16
+ rcvar=" gitea_enable"
17
+
18
+ load_rc_config $name
19
+
20
+ : ${gitea_user:= " git" }
21
+ : ${gitea_enable:= " NO" }
22
+ : ${gitea_directory:= " /home/git" }
23
+
24
+ command=" ${gitea_directory} /gitea web"
25
+ procname=" $( echo $command | cut -d' ' -f1) "
26
+
27
+ pidfile=" ${gitea_directory} /${name} .pid"
28
+
29
+ start_cmd=" ${name} _start"
30
+ stop_cmd=" ${name} _stop"
31
+
32
+ gitea_start () {
33
+ cd ${gitea_directory}
34
+ export USER=${gitea_user}
35
+ export HOME=/usr/home/${gitea_user}
36
+ /usr/sbin/daemon -f -u ${gitea_user} -p ${pidfile} $command
37
+ }
38
+
39
+ gitea_stop () {
40
+ if [ ! -f $pidfile ]; then
41
+ echo " GITEA PID File not found. Maybe GITEA is not running?"
42
+ else
43
+ kill $( cat $pidfile )
44
+ fi
45
+ }
46
+
47
+ run_rc_command " $1 "
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ #
3
+ # $OpenBSD$
4
+
5
+ daemon=" /home/git/gitea/gitea"
6
+ daemon_user=" git"
7
+ daemon_flags=" web"
8
+
9
+ gitea_directory=" /home/git/gitea"
10
+
11
+ rc_bg=YES
12
+
13
+ . /etc/rc.d/rc.subr
14
+
15
+ rc_start () {
16
+ ${rcexec} " cd ${gitea_directory} ; ${daemon} ${daemon_flags} ${_bg} "
17
+ }
18
+
19
+ rc_cmd $1
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
2
#
3
- # /etc/init.d/gogs
3
+ # /etc/init.d/gitea
4
4
#
5
5
# Runs the Gogs Go Git Service.
6
6
#
7
7
8
8
# ## BEGIN INIT INFO
9
- # Provides: gogs
9
+ # Provides: gitea
10
10
# Required-Start: $remote_fs
11
11
# Required-Stop: $remote_fs
12
12
# Default-Start: 2 3 4 5
13
13
# Default-Stop: 0 1 6
14
- # Short-Description: Start gogs at boot time.
15
- # Description: Control gogs .
14
+ # Short-Description: Start gitea at boot time.
15
+ # Description: Control gitea .
16
16
# ## END INIT INFO
17
17
18
18
# Default values
19
19
20
- NAME=gogs
21
- GITEA_HOME=/home/git/gogs
20
+ NAME=gitea
21
+ GITEA_HOME=/home/git/gitea
22
22
GITEA_PATH=${GITEA_HOME} /$NAME
23
23
GITEA_USER=git
24
24
SERVICENAME=" Go Git Service"
25
- LOCKFILE=/var/lock/subsys/gogs
25
+ LOCKFILE=/var/lock/subsys/gitea
26
26
LOGPATH=${GITEA_HOME} /log
27
27
LOGFILE=${LOGPATH} /error.log
28
- # gogs creates its own gogs .log from stdout
28
+ # gitea creates its own gitea .log from stdout
29
29
RETVAL=0
30
30
31
- # Read configuration from /etc/sysconfig/gogs to override defaults
31
+ # Read configuration from /etc/sysconfig/gitea to override defaults
32
32
[ -r /etc/sysconfig/$NAME ] && . /etc/sysconfig/$NAME
33
33
34
34
# Don't do anything if nothing is installed
Original file line number Diff line number Diff line change 3
3
<plist version =" 1.0" >
4
4
<dict >
5
5
<key >Label </key >
6
- <string >io.gogs .web </string >
6
+ <string >io.gitea .web </string >
7
7
<!-- assumes Gogs is running under 'git' account -->
8
8
<!-- modify below to reflect your settings -->
9
9
<key >UserName </key >
12
12
<string >git </string >
13
13
<key >ProgramArguments </key >
14
14
<array >
15
- <!-- assumes Gogs is installed in /Users/git/gogs -->
15
+ <!-- assumes Gogs is installed in /Users/git/gitea -->
16
16
<!-- modify below to reflect your settings -->
17
- <string >/Users/git/gogs/gogs </string >
17
+ <string >/Users/git/gitea/gitea </string >
18
18
<string >web </string >
19
19
</array >
20
20
<key >RunAtLoad </key >
21
21
<true />
22
22
<key >KeepAlive </key >
23
23
<true />
24
- <!-- assumes Gogs is installed in /Users/git/gogs -->
24
+ <!-- assumes Gogs is installed in /Users/git/gitea -->
25
25
<!-- modify below to reflect your settings -->
26
26
<key >WorkingDirectory </key >
27
- <string >/Users/git/gogs / </string >
27
+ <string >/Users/git/gitea / </string >
28
28
<key >StandardOutPath </key >
29
- <string >/Users/git/gogs /log/stdout.log </string >
29
+ <string >/Users/git/gitea /log/stdout.log </string >
30
30
<key >StandardErrorPath </key >
31
- <string >/Users/git/gogs /log/stderr.log </string >
31
+ <string >/Users/git/gitea /log/stderr.log </string >
32
32
<!-- default 256 is too low for Gogs needs using parallel pipes -->
33
33
<key >SoftResourceLimits </key >
34
34
<dict >
Original file line number Diff line number Diff line change 1
- [program:gogs ]
1
+ [program:gitea ]
2
2
directory=/home/git/go/src/github.com/go-gitea/gitea/
3
- command=/home/git/go/src/github.com/go-gitea/gitea/gogs web
3
+ command=/home/git/go/src/github.com/go-gitea/gitea/gitea web
4
4
autostart=true
5
5
autorestart=true
6
6
startsecs=10
7
- stdout_logfile=/var/log/gogs /stdout.log
7
+ stdout_logfile=/var/log/gitea /stdout.log
8
8
stdout_logfile_maxbytes=1MB
9
9
stdout_logfile_backups=10
10
10
stdout_capture_maxbytes=1MB
11
- stderr_logfile=/var/log/gogs /stderr.log
11
+ stderr_logfile=/var/log/gitea /stderr.log
12
12
stderr_logfile_maxbytes=1MB
13
13
stderr_logfile_backups=10
14
14
stderr_capture_maxbytes=1MB
Original file line number Diff line number Diff line change @@ -17,8 +17,8 @@ After=network.target
17
17
Type =simple
18
18
User =git
19
19
Group =git
20
- WorkingDirectory =/home/git/gogs
21
- ExecStart =/home/git/gogs/gogs web
20
+ WorkingDirectory =/home/git/gitea
21
+ ExecStart =/home/git/gitea/gitea web
22
22
Restart =always
23
23
Environment =USER =git HOME =/home/git
24
24
You can’t perform that action at this time.
0 commit comments