summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorSandro Santilli <strk@kbt.io>2016-11-07 11:41:50 +0100
committerSandro Santilli <strk@kbt.io>2016-11-07 16:05:18 +0100
commitb7263f31a5a0a4a0ac8fe92c83563d7b7dcf7423 (patch)
tree782bbf98af42c4ffb3d8c38dc787911706d1390e /scripts
parent1b962bac0bb00d6ce2bfd29fdeb1f95301e17b98 (diff)
downloadgitea-b7263f31a5a0a4a0ac8fe92c83563d7b7dcf7423.tar.gz
gitea-b7263f31a5a0a4a0ac8fe92c83563d7b7dcf7423.zip
Replace GOGS with GITEA in variable names
Still use GOGS_WORK_DIR and GOGS_CUSTOM env variables as a fallback if the equivalent GITEA_* are not set, warning user about the need for change. Does not change "gogs" to "gitea" in webhook type name Because "gogs" hook type is part of the API (routes) and used in templates... Closes #87
Diffstat (limited to 'scripts')
-rw-r--r--scripts/init/centos/gogs18
-rw-r--r--scripts/init/freebsd/gogs2
-rw-r--r--scripts/init/suse/gogs18
3 files changed, 19 insertions, 19 deletions
diff --git a/scripts/init/centos/gogs b/scripts/init/centos/gogs
index cacf57423a..1a9fc27728 100644
--- a/scripts/init/centos/gogs
+++ b/scripts/init/centos/gogs
@@ -24,12 +24,12 @@
# Default values
NAME=gogs
-GOGS_HOME=/home/git/gogs
-GOGS_PATH=${GOGS_HOME}/$NAME
-GOGS_USER=git
+GITEA_HOME=/home/git/gogs
+GITEA_PATH=${GITEA_HOME}/$NAME
+GITEA_USER=git
SERVICENAME="Gogs Go Git Service"
LOCKFILE=/var/lock/subsys/gogs
-LOGPATH=${GOGS_HOME}/log
+LOGPATH=${GITEA_HOME}/log
LOGFILE=${LOGPATH}/gogs.log
RETVAL=0
@@ -37,19 +37,19 @@ RETVAL=0
[ -r /etc/sysconfig/$NAME ] && . /etc/sysconfig/$NAME
# Don't do anything if nothing is installed
-[ -x ${GOGS_PATH} ] || exit 0
+[ -x ${GITEA_PATH} ] || exit 0
# exit if logpath dir is not created.
[ -x ${LOGPATH} ] || exit 0
DAEMON_OPTS="--check $NAME"
# Set additional options, if any
-[ ! -z "$GOGS_USER" ] && DAEMON_OPTS="$DAEMON_OPTS --user=${GOGS_USER}"
+[ ! -z "$GITEA_USER" ] && DAEMON_OPTS="$DAEMON_OPTS --user=${GITEA_USER}"
start() {
- cd ${GOGS_HOME}
+ cd ${GITEA_HOME}
echo -n "Starting ${SERVICENAME}: "
- daemon $DAEMON_OPTS "${GOGS_PATH} web > ${LOGFILE} 2>&1 &"
+ daemon $DAEMON_OPTS "${GITEA_PATH} web > ${LOGFILE} 2>&1 &"
RETVAL=$?
echo
[ $RETVAL = 0 ] && touch ${LOCKFILE}
@@ -58,7 +58,7 @@ start() {
}
stop() {
- cd ${GOGS_HOME}
+ cd ${GITEA_HOME}
echo -n "Shutting down ${SERVICENAME}: "
killproc ${NAME}
RETVAL=$?
diff --git a/scripts/init/freebsd/gogs b/scripts/init/freebsd/gogs
index eb57157476..8fc0359eff 100644
--- a/scripts/init/freebsd/gogs
+++ b/scripts/init/freebsd/gogs
@@ -38,7 +38,7 @@ gogs_start() {
gogs_stop() {
if [ ! -f $pidfile ]; then
- echo "GOGS PID File not found. Maybe GOGS is not running?"
+ echo "GITEA PID File not found. Maybe GITEA is not running?"
else
kill $(cat $pidfile)
fi
diff --git a/scripts/init/suse/gogs b/scripts/init/suse/gogs
index ea7dfa0a6e..da5f795807 100644
--- a/scripts/init/suse/gogs
+++ b/scripts/init/suse/gogs
@@ -18,12 +18,12 @@
# Default values
NAME=gogs
-GOGS_HOME=/home/git/gogs
-GOGS_PATH=${GOGS_HOME}/$NAME
-GOGS_USER=git
+GITEA_HOME=/home/git/gogs
+GITEA_PATH=${GITEA_HOME}/$NAME
+GITEA_USER=git
SERVICENAME="Go Git Service"
LOCKFILE=/var/lock/subsys/gogs
-LOGPATH=${GOGS_HOME}/log
+LOGPATH=${GITEA_HOME}/log
LOGFILE=${LOGPATH}/error.log
# gogs creates its own gogs.log from stdout
RETVAL=0
@@ -32,7 +32,7 @@ RETVAL=0
[ -r /etc/sysconfig/$NAME ] && . /etc/sysconfig/$NAME
# Don't do anything if nothing is installed
-test -x ${GOGS_PATH} || { echo "$NAME not installed";
+test -x ${GITEA_PATH} || { echo "$NAME not installed";
if [ "$1" = "stop" ]; then exit 0;
else exit 5; fi; }
@@ -53,12 +53,12 @@ case "$1" in
echo -n "Starting ${SERVICENAME} "
# As we can't use startproc, we have to check ourselves if the service is already running
- /sbin/checkproc ${GOGS_PATH}
+ /sbin/checkproc ${GITEA_PATH}
if [ $? -eq 0 ]; then
# return skipped as service is already running
(exit 5)
else
- su - ${GOGS_USER} -c "USER=${GOGS_USER} ${GOGS_PATH} web 2>&1 >>${LOGFILE} &"
+ su - ${GITEA_USER} -c "USER=${GITEA_USER} ${GITEA_PATH} web 2>&1 >>${LOGFILE} &"
fi
# Remember status and be verbose
@@ -70,7 +70,7 @@ case "$1" in
## Stop daemon with killproc(8) and if this fails
## killproc sets the return value according to LSB.
- /sbin/killproc ${GOGS_PATH}
+ /sbin/killproc ${GITEA_PATH}
# Remember status and be verbose
rc_status -v
@@ -100,7 +100,7 @@ case "$1" in
# 5--199 reserved (5--99 LSB, 100--149 distro, 150--199 appl.)
# NOTE: checkproc returns LSB compliant status values.
- /sbin/checkproc ${GOGS_PATH}
+ /sbin/checkproc ${GITEA_PATH}
# NOTE: rc_status knows that we called this init script with
# "status" option and adapts its messages accordingly.
rc_status -v