Skip to content

Commit 145ab5c

Browse files
committed
Rename and update init files to use "gitea" instead of "gogs"
Closes #102
1 parent b7263f3 commit 145ab5c

File tree

10 files changed

+100
-100
lines changed

10 files changed

+100
-100
lines changed

scripts/init/centos/gogs renamed to scripts/init/centos/gitea

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh
22
#
3-
# /etc/rc.d/init.d/gogs
3+
# /etc/rc.d/init.d/gitea
44
#
55
# Runs the Gogs Go Git Service.
66
#
@@ -9,31 +9,31 @@
99
#
1010

1111
### BEGIN INIT INFO
12-
# Provides: gogs
12+
# Provides: gitea
1313
# Required-Start: $remote_fs $syslog
1414
# Required-Stop: $remote_fs $syslog
1515
# Default-Start: 2 3 4 5
1616
# 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.
1919
### END INIT INFO
2020

2121
# Source function library.
2222
. /etc/init.d/functions
2323

2424
# Default values
2525

26-
NAME=gogs
27-
GITEA_HOME=/home/git/gogs
26+
NAME=gitea
27+
GITEA_HOME=/home/git/gitea
2828
GITEA_PATH=${GITEA_HOME}/$NAME
2929
GITEA_USER=git
3030
SERVICENAME="Gogs Go Git Service"
31-
LOCKFILE=/var/lock/subsys/gogs
31+
LOCKFILE=/var/lock/subsys/gitea
3232
LOGPATH=${GITEA_HOME}/log
33-
LOGFILE=${LOGPATH}/gogs.log
33+
LOGFILE=${LOGPATH}/gitea.log
3434
RETVAL=0
3535

36-
# Read configuration from /etc/sysconfig/gogs to override defaults
36+
# Read configuration from /etc/sysconfig/gitea to override defaults
3737
[ -r /etc/sysconfig/$NAME ] && . /etc/sysconfig/$NAME
3838

3939
# Don't do anything if nothing is installed

scripts/init/debian/gogs renamed to scripts/init/debian/gitea

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#! /bin/sh
22
### BEGIN INIT INFO
3-
# Provides: gogs
3+
# Provides: gitea
44
# Required-Start: $syslog $network
55
# Required-Stop: $syslog
66
# Default-Start: 2 3 4 5
@@ -16,11 +16,11 @@
1616
# PATH should only include /usr/* if it runs after the mountnfs.sh script
1717
PATH=/sbin:/usr/sbin:/bin:/usr/bin
1818
DESC="Go Git Service"
19-
NAME=gogs
19+
NAME=gitea
2020
SERVICEVERBOSE=yes
2121
PIDFILE=/var/run/$NAME.pid
2222
SCRIPTNAME=/etc/init.d/$NAME
23-
WORKINGDIR=/home/git/gogs
23+
WORKINGDIR=/home/git/gitea
2424
DAEMON=$WORKINGDIR/$NAME
2525
DAEMON_ARGS="web"
2626
USER=git

scripts/init/freebsd/gitea

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
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"

scripts/init/freebsd/gogs

Lines changed: 0 additions & 47 deletions
This file was deleted.

scripts/init/openbsd/gitea

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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

scripts/init/openbsd/gogs

Lines changed: 0 additions & 19 deletions
This file was deleted.

scripts/init/suse/gogs renamed to scripts/init/suse/gitea

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
11
#!/bin/sh
22
#
3-
# /etc/init.d/gogs
3+
# /etc/init.d/gitea
44
#
55
# Runs the Gogs Go Git Service.
66
#
77

88
### BEGIN INIT INFO
9-
# Provides: gogs
9+
# Provides: gitea
1010
# Required-Start: $remote_fs
1111
# Required-Stop: $remote_fs
1212
# Default-Start: 2 3 4 5
1313
# 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.
1616
### END INIT INFO
1717

1818
# Default values
1919

20-
NAME=gogs
21-
GITEA_HOME=/home/git/gogs
20+
NAME=gitea
21+
GITEA_HOME=/home/git/gitea
2222
GITEA_PATH=${GITEA_HOME}/$NAME
2323
GITEA_USER=git
2424
SERVICENAME="Go Git Service"
25-
LOCKFILE=/var/lock/subsys/gogs
25+
LOCKFILE=/var/lock/subsys/gitea
2626
LOGPATH=${GITEA_HOME}/log
2727
LOGFILE=${LOGPATH}/error.log
28-
# gogs creates its own gogs.log from stdout
28+
# gitea creates its own gitea.log from stdout
2929
RETVAL=0
3030

31-
# Read configuration from /etc/sysconfig/gogs to override defaults
31+
# Read configuration from /etc/sysconfig/gitea to override defaults
3232
[ -r /etc/sysconfig/$NAME ] && . /etc/sysconfig/$NAME
3333

3434
# Don't do anything if nothing is installed

scripts/launchd/io.gogs.web.plist renamed to scripts/launchd/io.gitea.web.plist

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<plist version="1.0">
44
<dict>
55
<key>Label</key>
6-
<string>io.gogs.web</string>
6+
<string>io.gitea.web</string>
77
<!-- assumes Gogs is running under 'git' account -->
88
<!-- modify below to reflect your settings -->
99
<key>UserName</key>
@@ -12,23 +12,23 @@
1212
<string>git</string>
1313
<key>ProgramArguments</key>
1414
<array>
15-
<!-- assumes Gogs is installed in /Users/git/gogs -->
15+
<!-- assumes Gogs is installed in /Users/git/gitea -->
1616
<!-- modify below to reflect your settings -->
17-
<string>/Users/git/gogs/gogs</string>
17+
<string>/Users/git/gitea/gitea</string>
1818
<string>web</string>
1919
</array>
2020
<key>RunAtLoad</key>
2121
<true/>
2222
<key>KeepAlive</key>
2323
<true/>
24-
<!-- assumes Gogs is installed in /Users/git/gogs -->
24+
<!-- assumes Gogs is installed in /Users/git/gitea -->
2525
<!-- modify below to reflect your settings -->
2626
<key>WorkingDirectory</key>
27-
<string>/Users/git/gogs/</string>
27+
<string>/Users/git/gitea/</string>
2828
<key>StandardOutPath</key>
29-
<string>/Users/git/gogs/log/stdout.log</string>
29+
<string>/Users/git/gitea/log/stdout.log</string>
3030
<key>StandardErrorPath</key>
31-
<string>/Users/git/gogs/log/stderr.log</string>
31+
<string>/Users/git/gitea/log/stderr.log</string>
3232
<!-- default 256 is too low for Gogs needs using parallel pipes -->
3333
<key>SoftResourceLimits</key>
3434
<dict>

scripts/supervisor/gogs renamed to scripts/supervisor/gitea

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
[program:gogs]
1+
[program:gitea]
22
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
44
autostart=true
55
autorestart=true
66
startsecs=10
7-
stdout_logfile=/var/log/gogs/stdout.log
7+
stdout_logfile=/var/log/gitea/stdout.log
88
stdout_logfile_maxbytes=1MB
99
stdout_logfile_backups=10
1010
stdout_capture_maxbytes=1MB
11-
stderr_logfile=/var/log/gogs/stderr.log
11+
stderr_logfile=/var/log/gitea/stderr.log
1212
stderr_logfile_maxbytes=1MB
1313
stderr_logfile_backups=10
1414
stderr_capture_maxbytes=1MB

scripts/systemd/gogs.service renamed to scripts/systemd/gitea.service

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ After=network.target
1717
Type=simple
1818
User=git
1919
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
2222
Restart=always
2323
Environment=USER=git HOME=/home/git
2424

0 commit comments

Comments
 (0)