diff options
author | Unknwon <u@gogs.io> | 2015-03-20 01:58:28 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-03-20 01:58:28 -0400 |
commit | 62e436e6b7a41bac2e17a26f08649c144cef5b57 (patch) | |
tree | 379be1b74989d5be2aacc68753b0d3d12597d400 /scripts/init/centos | |
parent | 4b9fb43a708d0aaaf710a060f7b2dd0b7ad959d0 (diff) | |
parent | e312634286e68d8fac4d20adb729661f8a444b2a (diff) | |
download | gitea-62e436e6b7a41bac2e17a26f08649c144cef5b57.tar.gz gitea-62e436e6b7a41bac2e17a26f08649c144cef5b57.zip |
Merge branch 'develop' of github.com:gogits/gogs into release/0.6.1
Diffstat (limited to 'scripts/init/centos')
-rw-r--r-- | scripts/init/centos/gogs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/scripts/init/centos/gogs b/scripts/init/centos/gogs index 90469498be..1a92ff2070 100644 --- a/scripts/init/centos/gogs +++ b/scripts/init/centos/gogs @@ -28,7 +28,6 @@ GOGS_HOME=/home/git/gogs GOGS_PATH=${GOGS_HOME}/$NAME GOGS_USER=git SERVICENAME="Gogs Go Git Service" -PID=/var/run/$NAME.pid LOCKFILE=/var/lock/subsys/gogs LOGFILE=${GOGS_HOME}/log/gogs.log RETVAL=0 @@ -39,7 +38,7 @@ RETVAL=0 # Don't do anything if nothing is installed [ -x ${GOGS_PATH} ] || exit 0 -DAEMON_OPTS="" +DAEMON_OPTS="--check $NAME" # Set additional options, if any [ ! -z "$GOGS_USER" ] && DAEMON_OPTS="$DAEMON_OPTS --user=${GOGS_USER}" @@ -47,8 +46,7 @@ DAEMON_OPTS="" start() { cd ${GOGS_HOME} echo -n "Starting ${SERVICENAME}: " - daemon $DAEMON_OPTS --pidfile=${PID} "${GOGS_PATH} web 2>&1 > ${LOGFILE} &" - echo $! > ${PID} + daemon $DAEMON_OPTS "${GOGS_PATH} web > ${LOGFILE} 2>&1 &" RETVAL=$? echo [ $RETVAL = 0 ] && touch ${LOCKFILE} @@ -59,10 +57,10 @@ start() { stop() { cd ${GOGS_HOME} echo -n "Shutting down ${SERVICENAME}: " - killproc -p ${PID} ${NAME} + killproc ${NAME} RETVAL=$? echo - [ $RETVAL = 0 ] && rm -f ${LOCKFILE} ${PID} + [ $RETVAL = 0 ] && rm -f ${LOCKFILE} } case "$1" in @@ -74,7 +72,7 @@ case "$1" in stop ;; status) - status -p ${PID} ${NAME} + status ${NAME} ;; restart) stop |