mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-01 05:36:19 +01:00
Rename and update init files to use "gitea" instead of "gogs"
Closes #102
This commit is contained in:
parent
b7263f31a5
commit
145ab5c89a
10 changed files with 100 additions and 100 deletions
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# /etc/rc.d/init.d/gogs
|
# /etc/rc.d/init.d/gitea
|
||||||
#
|
#
|
||||||
# Runs the Gogs Go Git Service.
|
# Runs the Gogs Go Git Service.
|
||||||
#
|
#
|
||||||
|
@ -9,13 +9,13 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
### BEGIN INIT INFO
|
### BEGIN INIT INFO
|
||||||
# Provides: gogs
|
# Provides: gitea
|
||||||
# Required-Start: $remote_fs $syslog
|
# Required-Start: $remote_fs $syslog
|
||||||
# Required-Stop: $remote_fs $syslog
|
# Required-Stop: $remote_fs $syslog
|
||||||
# Default-Start: 2 3 4 5
|
# Default-Start: 2 3 4 5
|
||||||
# Default-Stop: 0 1 6
|
# Default-Stop: 0 1 6
|
||||||
# Short-Description: Start gogs at boot time.
|
# Short-Description: Start gitea at boot time.
|
||||||
# Description: Control gogs.
|
# Description: Control gitea.
|
||||||
### END INIT INFO
|
### END INIT INFO
|
||||||
|
|
||||||
# Source function library.
|
# Source function library.
|
||||||
|
@ -23,17 +23,17 @@
|
||||||
|
|
||||||
# Default values
|
# Default values
|
||||||
|
|
||||||
NAME=gogs
|
NAME=gitea
|
||||||
GITEA_HOME=/home/git/gogs
|
GITEA_HOME=/home/git/gitea
|
||||||
GITEA_PATH=${GITEA_HOME}/$NAME
|
GITEA_PATH=${GITEA_HOME}/$NAME
|
||||||
GITEA_USER=git
|
GITEA_USER=git
|
||||||
SERVICENAME="Gogs Go Git Service"
|
SERVICENAME="Gogs Go Git Service"
|
||||||
LOCKFILE=/var/lock/subsys/gogs
|
LOCKFILE=/var/lock/subsys/gitea
|
||||||
LOGPATH=${GITEA_HOME}/log
|
LOGPATH=${GITEA_HOME}/log
|
||||||
LOGFILE=${LOGPATH}/gogs.log
|
LOGFILE=${LOGPATH}/gitea.log
|
||||||
RETVAL=0
|
RETVAL=0
|
||||||
|
|
||||||
# Read configuration from /etc/sysconfig/gogs to override defaults
|
# Read configuration from /etc/sysconfig/gitea to override defaults
|
||||||
[ -r /etc/sysconfig/$NAME ] && . /etc/sysconfig/$NAME
|
[ -r /etc/sysconfig/$NAME ] && . /etc/sysconfig/$NAME
|
||||||
|
|
||||||
# Don't do anything if nothing is installed
|
# Don't do anything if nothing is installed
|
|
@ -1,6 +1,6 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
### BEGIN INIT INFO
|
### BEGIN INIT INFO
|
||||||
# Provides: gogs
|
# Provides: gitea
|
||||||
# Required-Start: $syslog $network
|
# Required-Start: $syslog $network
|
||||||
# Required-Stop: $syslog
|
# Required-Stop: $syslog
|
||||||
# Default-Start: 2 3 4 5
|
# Default-Start: 2 3 4 5
|
||||||
|
@ -16,11 +16,11 @@
|
||||||
# PATH should only include /usr/* if it runs after the mountnfs.sh script
|
# PATH should only include /usr/* if it runs after the mountnfs.sh script
|
||||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||||
DESC="Go Git Service"
|
DESC="Go Git Service"
|
||||||
NAME=gogs
|
NAME=gitea
|
||||||
SERVICEVERBOSE=yes
|
SERVICEVERBOSE=yes
|
||||||
PIDFILE=/var/run/$NAME.pid
|
PIDFILE=/var/run/$NAME.pid
|
||||||
SCRIPTNAME=/etc/init.d/$NAME
|
SCRIPTNAME=/etc/init.d/$NAME
|
||||||
WORKINGDIR=/home/git/gogs
|
WORKINGDIR=/home/git/gitea
|
||||||
DAEMON=$WORKINGDIR/$NAME
|
DAEMON=$WORKINGDIR/$NAME
|
||||||
DAEMON_ARGS="web"
|
DAEMON_ARGS="web"
|
||||||
USER=git
|
USER=git
|
47
scripts/init/freebsd/gitea
Normal file
47
scripts/init/freebsd/gitea
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# $FreeBSD$
|
||||||
|
#
|
||||||
|
# PROVIDE: gitea
|
||||||
|
# REQUIRE: NETWORKING SYSLOG
|
||||||
|
# KEYWORD: shutdown
|
||||||
|
#
|
||||||
|
# Add the following lines to /etc/rc.conf to enable gitea:
|
||||||
|
#
|
||||||
|
#gitea_enable="YES"
|
||||||
|
|
||||||
|
. /etc/rc.subr
|
||||||
|
|
||||||
|
name="gitea"
|
||||||
|
rcvar="gitea_enable"
|
||||||
|
|
||||||
|
load_rc_config $name
|
||||||
|
|
||||||
|
: ${gitea_user:="git"}
|
||||||
|
: ${gitea_enable:="NO"}
|
||||||
|
: ${gitea_directory:="/home/git"}
|
||||||
|
|
||||||
|
command="${gitea_directory}/gitea web"
|
||||||
|
procname="$(echo $command |cut -d' ' -f1)"
|
||||||
|
|
||||||
|
pidfile="${gitea_directory}/${name}.pid"
|
||||||
|
|
||||||
|
start_cmd="${name}_start"
|
||||||
|
stop_cmd="${name}_stop"
|
||||||
|
|
||||||
|
gitea_start() {
|
||||||
|
cd ${gitea_directory}
|
||||||
|
export USER=${gitea_user}
|
||||||
|
export HOME=/usr/home/${gitea_user}
|
||||||
|
/usr/sbin/daemon -f -u ${gitea_user} -p ${pidfile} $command
|
||||||
|
}
|
||||||
|
|
||||||
|
gitea_stop() {
|
||||||
|
if [ ! -f $pidfile ]; then
|
||||||
|
echo "GITEA PID File not found. Maybe GITEA is not running?"
|
||||||
|
else
|
||||||
|
kill $(cat $pidfile)
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
run_rc_command "$1"
|
|
@ -1,47 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# $FreeBSD$
|
|
||||||
#
|
|
||||||
# PROVIDE: gogs
|
|
||||||
# REQUIRE: NETWORKING SYSLOG
|
|
||||||
# KEYWORD: shutdown
|
|
||||||
#
|
|
||||||
# Add the following lines to /etc/rc.conf to enable gogs:
|
|
||||||
#
|
|
||||||
#gogs_enable="YES"
|
|
||||||
|
|
||||||
. /etc/rc.subr
|
|
||||||
|
|
||||||
name="gogs"
|
|
||||||
rcvar="gogs_enable"
|
|
||||||
|
|
||||||
load_rc_config $name
|
|
||||||
|
|
||||||
: ${gogs_user:="git"}
|
|
||||||
: ${gogs_enable:="NO"}
|
|
||||||
: ${gogs_directory:="/home/git"}
|
|
||||||
|
|
||||||
command="${gogs_directory}/gogs web"
|
|
||||||
procname="$(echo $command |cut -d' ' -f1)"
|
|
||||||
|
|
||||||
pidfile="${gogs_directory}/${name}.pid"
|
|
||||||
|
|
||||||
start_cmd="${name}_start"
|
|
||||||
stop_cmd="${name}_stop"
|
|
||||||
|
|
||||||
gogs_start() {
|
|
||||||
cd ${gogs_directory}
|
|
||||||
export USER=${gogs_user}
|
|
||||||
export HOME=/usr/home/${gogs_user}
|
|
||||||
/usr/sbin/daemon -f -u ${gogs_user} -p ${pidfile} $command
|
|
||||||
}
|
|
||||||
|
|
||||||
gogs_stop() {
|
|
||||||
if [ ! -f $pidfile ]; then
|
|
||||||
echo "GITEA PID File not found. Maybe GITEA is not running?"
|
|
||||||
else
|
|
||||||
kill $(cat $pidfile)
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
run_rc_command "$1"
|
|
19
scripts/init/openbsd/gitea
Executable file
19
scripts/init/openbsd/gitea
Executable file
|
@ -0,0 +1,19 @@
|
||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# $OpenBSD$
|
||||||
|
|
||||||
|
daemon="/home/git/gitea/gitea"
|
||||||
|
daemon_user="git"
|
||||||
|
daemon_flags="web"
|
||||||
|
|
||||||
|
gitea_directory="/home/git/gitea"
|
||||||
|
|
||||||
|
rc_bg=YES
|
||||||
|
|
||||||
|
. /etc/rc.d/rc.subr
|
||||||
|
|
||||||
|
rc_start() {
|
||||||
|
${rcexec} "cd ${gitea_directory}; ${daemon} ${daemon_flags} ${_bg}"
|
||||||
|
}
|
||||||
|
|
||||||
|
rc_cmd $1
|
|
@ -1,19 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# $OpenBSD$
|
|
||||||
|
|
||||||
daemon="/home/git/gogs/gogs"
|
|
||||||
daemon_user="git"
|
|
||||||
daemon_flags="web"
|
|
||||||
|
|
||||||
gogs_directory="/home/git/gogs"
|
|
||||||
|
|
||||||
rc_bg=YES
|
|
||||||
|
|
||||||
. /etc/rc.d/rc.subr
|
|
||||||
|
|
||||||
rc_start() {
|
|
||||||
${rcexec} "cd ${gogs_directory}; ${daemon} ${daemon_flags} ${_bg}"
|
|
||||||
}
|
|
||||||
|
|
||||||
rc_cmd $1
|
|
|
@ -1,34 +1,34 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# /etc/init.d/gogs
|
# /etc/init.d/gitea
|
||||||
#
|
#
|
||||||
# Runs the Gogs Go Git Service.
|
# Runs the Gogs Go Git Service.
|
||||||
#
|
#
|
||||||
|
|
||||||
### BEGIN INIT INFO
|
### BEGIN INIT INFO
|
||||||
# Provides: gogs
|
# Provides: gitea
|
||||||
# Required-Start: $remote_fs
|
# Required-Start: $remote_fs
|
||||||
# Required-Stop: $remote_fs
|
# Required-Stop: $remote_fs
|
||||||
# Default-Start: 2 3 4 5
|
# Default-Start: 2 3 4 5
|
||||||
# Default-Stop: 0 1 6
|
# Default-Stop: 0 1 6
|
||||||
# Short-Description: Start gogs at boot time.
|
# Short-Description: Start gitea at boot time.
|
||||||
# Description: Control gogs.
|
# Description: Control gitea.
|
||||||
### END INIT INFO
|
### END INIT INFO
|
||||||
|
|
||||||
# Default values
|
# Default values
|
||||||
|
|
||||||
NAME=gogs
|
NAME=gitea
|
||||||
GITEA_HOME=/home/git/gogs
|
GITEA_HOME=/home/git/gitea
|
||||||
GITEA_PATH=${GITEA_HOME}/$NAME
|
GITEA_PATH=${GITEA_HOME}/$NAME
|
||||||
GITEA_USER=git
|
GITEA_USER=git
|
||||||
SERVICENAME="Go Git Service"
|
SERVICENAME="Go Git Service"
|
||||||
LOCKFILE=/var/lock/subsys/gogs
|
LOCKFILE=/var/lock/subsys/gitea
|
||||||
LOGPATH=${GITEA_HOME}/log
|
LOGPATH=${GITEA_HOME}/log
|
||||||
LOGFILE=${LOGPATH}/error.log
|
LOGFILE=${LOGPATH}/error.log
|
||||||
# gogs creates its own gogs.log from stdout
|
# gitea creates its own gitea.log from stdout
|
||||||
RETVAL=0
|
RETVAL=0
|
||||||
|
|
||||||
# Read configuration from /etc/sysconfig/gogs to override defaults
|
# Read configuration from /etc/sysconfig/gitea to override defaults
|
||||||
[ -r /etc/sysconfig/$NAME ] && . /etc/sysconfig/$NAME
|
[ -r /etc/sysconfig/$NAME ] && . /etc/sysconfig/$NAME
|
||||||
|
|
||||||
# Don't do anything if nothing is installed
|
# Don't do anything if nothing is installed
|
|
@ -3,7 +3,7 @@
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
<key>Label</key>
|
<key>Label</key>
|
||||||
<string>io.gogs.web</string>
|
<string>io.gitea.web</string>
|
||||||
<!-- assumes Gogs is running under 'git' account -->
|
<!-- assumes Gogs is running under 'git' account -->
|
||||||
<!-- modify below to reflect your settings -->
|
<!-- modify below to reflect your settings -->
|
||||||
<key>UserName</key>
|
<key>UserName</key>
|
||||||
|
@ -12,23 +12,23 @@
|
||||||
<string>git</string>
|
<string>git</string>
|
||||||
<key>ProgramArguments</key>
|
<key>ProgramArguments</key>
|
||||||
<array>
|
<array>
|
||||||
<!-- assumes Gogs is installed in /Users/git/gogs -->
|
<!-- assumes Gogs is installed in /Users/git/gitea -->
|
||||||
<!-- modify below to reflect your settings -->
|
<!-- modify below to reflect your settings -->
|
||||||
<string>/Users/git/gogs/gogs</string>
|
<string>/Users/git/gitea/gitea</string>
|
||||||
<string>web</string>
|
<string>web</string>
|
||||||
</array>
|
</array>
|
||||||
<key>RunAtLoad</key>
|
<key>RunAtLoad</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>KeepAlive</key>
|
<key>KeepAlive</key>
|
||||||
<true/>
|
<true/>
|
||||||
<!-- assumes Gogs is installed in /Users/git/gogs -->
|
<!-- assumes Gogs is installed in /Users/git/gitea -->
|
||||||
<!-- modify below to reflect your settings -->
|
<!-- modify below to reflect your settings -->
|
||||||
<key>WorkingDirectory</key>
|
<key>WorkingDirectory</key>
|
||||||
<string>/Users/git/gogs/</string>
|
<string>/Users/git/gitea/</string>
|
||||||
<key>StandardOutPath</key>
|
<key>StandardOutPath</key>
|
||||||
<string>/Users/git/gogs/log/stdout.log</string>
|
<string>/Users/git/gitea/log/stdout.log</string>
|
||||||
<key>StandardErrorPath</key>
|
<key>StandardErrorPath</key>
|
||||||
<string>/Users/git/gogs/log/stderr.log</string>
|
<string>/Users/git/gitea/log/stderr.log</string>
|
||||||
<!-- default 256 is too low for Gogs needs using parallel pipes -->
|
<!-- default 256 is too low for Gogs needs using parallel pipes -->
|
||||||
<key>SoftResourceLimits</key>
|
<key>SoftResourceLimits</key>
|
||||||
<dict>
|
<dict>
|
|
@ -1,14 +1,14 @@
|
||||||
[program:gogs]
|
[program:gitea]
|
||||||
directory=/home/git/go/src/github.com/go-gitea/gitea/
|
directory=/home/git/go/src/github.com/go-gitea/gitea/
|
||||||
command=/home/git/go/src/github.com/go-gitea/gitea/gogs web
|
command=/home/git/go/src/github.com/go-gitea/gitea/gitea web
|
||||||
autostart=true
|
autostart=true
|
||||||
autorestart=true
|
autorestart=true
|
||||||
startsecs=10
|
startsecs=10
|
||||||
stdout_logfile=/var/log/gogs/stdout.log
|
stdout_logfile=/var/log/gitea/stdout.log
|
||||||
stdout_logfile_maxbytes=1MB
|
stdout_logfile_maxbytes=1MB
|
||||||
stdout_logfile_backups=10
|
stdout_logfile_backups=10
|
||||||
stdout_capture_maxbytes=1MB
|
stdout_capture_maxbytes=1MB
|
||||||
stderr_logfile=/var/log/gogs/stderr.log
|
stderr_logfile=/var/log/gitea/stderr.log
|
||||||
stderr_logfile_maxbytes=1MB
|
stderr_logfile_maxbytes=1MB
|
||||||
stderr_logfile_backups=10
|
stderr_logfile_backups=10
|
||||||
stderr_capture_maxbytes=1MB
|
stderr_capture_maxbytes=1MB
|
|
@ -17,8 +17,8 @@ After=network.target
|
||||||
Type=simple
|
Type=simple
|
||||||
User=git
|
User=git
|
||||||
Group=git
|
Group=git
|
||||||
WorkingDirectory=/home/git/gogs
|
WorkingDirectory=/home/git/gitea
|
||||||
ExecStart=/home/git/gogs/gogs web
|
ExecStart=/home/git/gitea/gitea web
|
||||||
Restart=always
|
Restart=always
|
||||||
Environment=USER=git HOME=/home/git
|
Environment=USER=git HOME=/home/git
|
||||||
|
|
Loading…
Reference in a new issue