From b992deae920086ed8663edb64d95bcf3ab231993 Mon Sep 17 00:00:00 2001 From: "T.J. Yang" Date: Sat, 31 Oct 2015 07:32:34 -0500 Subject: adding extra check on logpath --- scripts/init/centos/gogs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/init/centos/gogs b/scripts/init/centos/gogs index 5ff6de53..cacf5742 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" -- cgit v1.2.3 From 923c45d7212442afe2a63eb6b12f918ce12da10d Mon Sep 17 00:00:00 2001 From: Renato Aquino Date: Thu, 12 Nov 2015 15:36:35 -0200 Subject: HOME fix into FreeBSD init script --- scripts/init/freebsd/gogs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/init/freebsd/gogs b/scripts/init/freebsd/gogs index e1d3bdee..42258c40 100644 --- a/scripts/init/freebsd/gogs +++ b/scripts/init/freebsd/gogs @@ -31,7 +31,7 @@ stop_cmd="${name}_stop" gogs_start() { cd ${gogs_directory} export USER=${gogs_user} - export HOME=${gogs_directory} + export HOME=/usr/home/${gogs_user} /usr/sbin/daemon -f -u ${gogs_user} -p ${pidfile} $command } -- cgit v1.2.3