aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author无闻 <u@gogs.io>2015-10-31 13:17:02 -0400
committer无闻 <u@gogs.io>2015-10-31 13:17:02 -0400
commit6b8bef3cf6c61459f8bec03aa05e2ebcd099f871 (patch)
tree0ca0c89a9422c345b2912202d251435451640884
parent940898a3ffad6b5bcd27c5e5ed086b381ac477b6 (diff)
parentb992deae920086ed8663edb64d95bcf3ab231993 (diff)
downloadgitea-6b8bef3cf6c61459f8bec03aa05e2ebcd099f871.tar.gz
gitea-6b8bef3cf6c61459f8bec03aa05e2ebcd099f871.zip
Merge pull request #1869 from tjyang/tjyang
adding extra check on logpath
-rw-r--r--scripts/init/centos/gogs5
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"