From owner-svn-ports-all@freebsd.org Tue Apr 24 01:01:38 2018 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A8156FAFFBB; Tue, 24 Apr 2018 01:01:38 +0000 (UTC) (envelope-from swills@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5873D79F5D; Tue, 24 Apr 2018 01:01:38 +0000 (UTC) (envelope-from swills@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3AC1240EA; Tue, 24 Apr 2018 01:01:38 +0000 (UTC) (envelope-from swills@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3O11c8T042213; Tue, 24 Apr 2018 01:01:38 GMT (envelope-from swills@FreeBSD.org) Received: (from swills@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3O11cgT042211; Tue, 24 Apr 2018 01:01:38 GMT (envelope-from swills@FreeBSD.org) Message-Id: <201804240101.w3O11cgT042211@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: swills set sender to swills@FreeBSD.org using -f From: Steve Wills Date: Tue, 24 Apr 2018 01:01:38 +0000 (UTC) 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 X-SVN-Group: ports-head X-SVN-Commit-Author: swills X-SVN-Commit-Paths: in head/www/gitlab-pages: . files X-SVN-Commit-Revision: 468171 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2018 01:01:38 -0000 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"