diff options
author | Sandro Santilli <strk@kbt.io> | 2016-11-07 11:41:50 +0100 |
---|---|---|
committer | Sandro Santilli <strk@kbt.io> | 2016-11-07 16:05:18 +0100 |
commit | b7263f31a5a0a4a0ac8fe92c83563d7b7dcf7423 (patch) | |
tree | 782bbf98af42c4ffb3d8c38dc787911706d1390e /scripts/init/centos/gogs | |
parent | 1b962bac0bb00d6ce2bfd29fdeb1f95301e17b98 (diff) | |
download | gitea-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/init/centos/gogs')
-rw-r--r-- | scripts/init/centos/gogs | 18 |
1 files changed, 9 insertions, 9 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=$? |