From owner-svn-ports-all@freebsd.org Sun Sep 9 15:56:19 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 89FA110979D3; Sun, 9 Sep 2018 15:56:19 +0000 (UTC) (envelope-from tobik@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 3DCFD767F9; Sun, 9 Sep 2018 15:56:19 +0000 (UTC) (envelope-from tobik@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 38C191BD34; Sun, 9 Sep 2018 15:56:19 +0000 (UTC) (envelope-from tobik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w89FuJSR079767; Sun, 9 Sep 2018 15:56:19 GMT (envelope-from tobik@FreeBSD.org) Received: (from tobik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w89FuIMY079766; Sun, 9 Sep 2018 15:56:18 GMT (envelope-from tobik@FreeBSD.org) Message-Id: <201809091556.w89FuIMY079766@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tobik set sender to tobik@FreeBSD.org using -f From: Tobias Kortkamp Date: Sun, 9 Sep 2018 15:56:18 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r479292 - in head/net-mgmt/statsite: . files X-SVN-Group: ports-head X-SVN-Commit-Author: tobik X-SVN-Commit-Paths: in head/net-mgmt/statsite: . files X-SVN-Commit-Revision: 479292 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.27 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: Sun, 09 Sep 2018 15:56:19 -0000 Author: tobik Date: Sun Sep 9 15:56:18 2018 New Revision: 479292 URL: https://svnweb.freebsd.org/changeset/ports/479292 Log: net-mgmt/statsite: Add rc script PR: 230740 Submitted by: ndowens@yahoo.com Approved by: rbarabas@rbarabas.info (maintainer timeout, 3 weeks) Added: head/net-mgmt/statsite/files/ head/net-mgmt/statsite/files/statsite.in (contents, props changed) Modified: head/net-mgmt/statsite/Makefile Modified: head/net-mgmt/statsite/Makefile ============================================================================== --- head/net-mgmt/statsite/Makefile Sun Sep 9 13:41:08 2018 (r479291) +++ head/net-mgmt/statsite/Makefile Sun Sep 9 15:56:18 2018 (r479292) @@ -3,6 +3,7 @@ PORTNAME= statsite PORTVERSION= 0.8.0 DISTVERSIONPREFIX= v +PORTREVISION= 1 CATEGORIES= net-mgmt MAINTAINER= rbarabas@rbarabas.info @@ -11,7 +12,7 @@ COMMENT= C implementation of statsd LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE -USES= autoreconf +USES= autoreconf python:env GNU_CONFIGURE= yes USE_GITHUB= yes GH_ACCOUNT= armon @@ -20,10 +21,18 @@ MAKE_ARGS= CC="${CC}" CFLAGS="${CFLAGS}" LDFLAGS="${LD USERS= statsd GROUPS= statsd +USE_RC_SUBR= statsite OPTIONS_DEFINE= DOCS PORTDOCS= README.md + +post-patch: + @${REINPLACE_CMD} -e 's,python,${PYTHON_CMD},' \ + -e 's,/usr/libexec,/usr/local/share,' \ + -e '/daemonize/d' \ + -e '/pid_file/d' \ + ${WRKSRC}/rpm/statsite.conf.example post-install: ${INSTALL_DATA} ${WRKSRC}/rpm/statsite.conf.example \ Added: head/net-mgmt/statsite/files/statsite.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/statsite/files/statsite.in Sun Sep 9 15:56:18 2018 (r479292) @@ -0,0 +1,31 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# PROVIDE: statsite +# REQUIRE: NETWORKING SYSLOG +# KEYWORD: shutdown +# +# Add these lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# statsite_enable (bool): Set to NO by default. +# Set it to YES to enable statsite. +# statsite_config (path): Set to %%PREFIX%%/etc/statsite.conf +# by default. + +. /etc/rc.subr + +name=statsite +rcvar=statsite_enable + +load_rc_config $name + +: ${statsite_enable:="NO"} +: ${statsite_config="%%PREFIX%%/etc/statsite.conf"} + +pidfile=/var/run/${name}.pid +command="/usr/sbin/daemon" +command_args="-f -u statsd -P ${pidfile} %%PREFIX%%/bin/statsite -f ${statsite_config}" + +run_rc_command "$1"