Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Apr 2018 01:01:38 +0000 (UTC)
From:      Steve Wills <swills@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r468171 - in head/www/gitlab-pages: . files
Message-ID:  <201804240101.w3O11cgT042211@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: swills
Date: Tue Apr 24 01:01:37 2018
New Revision: 468171
URL: https://svnweb.freebsd.org/changeset/ports/468171

Log:
  www/gitlab-pages: fix rc script

Modified:
  head/www/gitlab-pages/Makefile   (contents, props changed)
  head/www/gitlab-pages/files/gitlab_pages.in

Modified: head/www/gitlab-pages/Makefile
==============================================================================
--- head/www/gitlab-pages/Makefile	Tue Apr 24 00:53:56 2018	(r468170)
+++ head/www/gitlab-pages/Makefile	Tue Apr 24 01:01:37 2018	(r468171)
@@ -2,6 +2,7 @@
 
 PORTNAME=	gitlab-pages
 PORTVERSION=	0.7.1
+PORTREVISION=	1
 CATEGORIES=	www
 
 MAINTAINER=	swills@FreeBSD.org

Modified: head/www/gitlab-pages/files/gitlab_pages.in
==============================================================================
--- head/www/gitlab-pages/files/gitlab_pages.in	Tue Apr 24 00:53:56 2018	(r468170)
+++ head/www/gitlab-pages/files/gitlab_pages.in	Tue Apr 24 01:01:37 2018	(r468171)
@@ -17,6 +17,8 @@
 #                              Set it to user to run gitlab_pages under
 # gitlab_pages_group (str):    Set to "gitlab-pages" by default.
 #                              Set it to group to run gitlab-pages under
+# gitlab_pages_logfile (str):  Set to "/var/log/gitlab_pages.log" by default.
+#                              Set it to file to send gitlab-pages logs to
 #
 
 . /etc/rc.subr
@@ -30,28 +32,30 @@ load_rc_config $name
 : ${gitlab_pages_dir:="/var/tmp/gitlab_pages"}
 : ${gitlab_pages_user:="gitlab-pages"}
 : ${gitlab_pages_group:="gitlab-pages"}
+: ${gitlab_pages_logfile:="/var/log/gitlab_pages.log"}
 
 export HOME=${gitlab_pages_dir}
 export PATH=${PATH}:%%PREFIX%%/bin
 
 pidfile="/var/run/${name}.pid"
-command="/usr/sbin/daemon"
-command_args="-f -p ${pidfile} %%PREFIX%%/bin/gitlab-pages run"
 gitlab_pages_chdir="${gitlab_pages_dir}"
 
 procname=%%PREFIX%%/bin/gitlab-pages
 
 start_precmd="gitlab_pages_startprecmd"
+start_cmd="gitlab_pages_startcmd"
 list_cmd="listfunc"
 register_cmd="registerfunc"
 
 listfunc()
 {
+        cd ${gitlab_pages_chdir} ; \
         su -m ${gitlab_pages_user} -c "env HOME=${gitlab_pages_dir} %%PREFIX%%/bin/gitlab-pages list"
 }
 
 registerfunc()
 {
+        cd ${gitlab_pages_chdir} ; \
         su -m ${gitlab_pages_user} -c "env HOME=${gitlab_pages_dir} %%PREFIX%%/bin/gitlab-pages register"
 }
 
@@ -63,6 +67,12 @@ gitlab_pages_startprecmd()
         if [ ! -d "${gitlab_pages_dir}" ]; then
                 install -d -o "${gitlab_pages_user}" -g "${gitlab_pages_group}" "${gitlab_pages_dir}"
         fi
+}
+
+gitlab_pages_startcmd()
+{
+        cd ${gitlab_pages_chdir} ; \
+        daemon -u ${gitlab_pages_user} -p ${pidfile} /usr/local/bin/gitlab-pages ${gitlab_pages_args} run < /dev/null >> ${gitlab_pages_logfile} 2>> ${gitlab_pages_logfile}
 }
 
 extra_commands="list register"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201804240101.w3O11cgT042211>