Skip to content

Commit

Permalink
adding extra check on logpath
Browse files Browse the repository at this point in the history
  • Loading branch information
tjyang committed Oct 31, 2015
1 parent 31b3757 commit b992dea
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/init/centos/gogs
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,17 @@ 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
[ -r /etc/sysconfig/$NAME ] && . /etc/sysconfig/$NAME

# 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"

Expand Down

0 comments on commit b992dea

Please sign in to comment.