diff options
author | T.J. Yang <tjyang2001@gmail.com> | 2015-10-31 07:32:34 -0500 |
---|---|---|
committer | T.J. Yang <tjyang2001@gmail.com> | 2015-10-31 07:32:34 -0500 |
commit | b992deae920086ed8663edb64d95bcf3ab231993 (patch) | |
tree | f3dcacf2a8ed2d409f16d56791424724884c8c81 /scripts | |
parent | 31b375782b55972b4ac7719d9bd1f3fadf1874f9 (diff) | |
download | gitea-b992deae920086ed8663edb64d95bcf3ab231993.tar.gz gitea-b992deae920086ed8663edb64d95bcf3ab231993.zip |
adding extra check on logpath
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/init/centos/gogs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/init/centos/gogs b/scripts/init/centos/gogs index 5ff6de537f..cacf57423a 100644 --- a/scripts/init/centos/gogs +++ b/scripts/init/centos/gogs @@ -29,7 +29,8 @@ GOGS_PATH=${GOGS_HOME}/$NAME GOGS_USER=git SERVICENAME="Gogs Go Git Service" LOCKFILE=/var/lock/subsys/gogs -LOGFILE=${GOGS_HOME}/log/gogs.log +LOGPATH=${GOGS_HOME}/log +LOGFILE=${LOGPATH}/gogs.log RETVAL=0 # Read configuration from /etc/sysconfig/gogs to override defaults @@ -37,6 +38,8 @@ RETVAL=0 # Don't do anything if nothing is installed [ -x ${GOGS_PATH} ] || exit 0 +# exit if logpath dir is not created. +[ -x ${LOGPATH} ] || exit 0 DAEMON_OPTS="--check $NAME" |