diff --git a/net-mgmt/promscale/Makefile b/net-mgmt/promscale/Makefile index 98b0ff0269d5..2d1f689bdba8 100644 --- a/net-mgmt/promscale/Makefile +++ b/net-mgmt/promscale/Makefile @@ -1,32 +1,33 @@ PORTNAME= promscale DISTVERSION= 0.16.0 +PORTREVISION= 1 CATEGORIES= net-mgmt MASTER_SITES= https://raw.githubusercontent.com/${GH_ACCOUNT}/${GH_PROJECT}/${DISTVERSIONFULL}/:gomod DISTFILES= go.mod:gomod MAINTAINER= feld@FreeBSD.org COMMENT= Timescale analytical platform for Prometheus metrics WWW= https://www.timescale.com/promscale LICENSE= APACHE20 LICENSE_FILE= ${WRKSRC}/LICENSE USES= go:modules USE_RC_SUBR?= ${PORTNAME} USERS= promscale GROUPS= ${USERS} SUB_LIST?= USERS=${USERS} GROUPS=${GROUPS} USE_GITHUB= yes GH_ACCOUNT= timescale GH_PROJECT= promscale GO_MODULE= github.com/timescale/promscale GO_TARGET= ./cmd/promscale PLIST_FILES= bin/promscale .include diff --git a/net-mgmt/promscale/files/promscale.in b/net-mgmt/promscale/files/promscale.in index d3b818ad31cc..04852908602c 100644 --- a/net-mgmt/promscale/files/promscale.in +++ b/net-mgmt/promscale/files/promscale.in @@ -1,47 +1,50 @@ #!/bin/sh # PROVIDE: promscale # REQUIRE: LOGIN # KEYWORD: shutdown # Add the following lines to /etc/rc.conf to enable promscale # promscale_enable="YES" # # promscale_enable (bool): # Set it to YES to enable promscale # Set to NO by default # promscale_user (string): # Set user that promscale will run under -# Default is "%%GRAFANA_USER%%" +# Default is "%%USERS%%" # promscale_group (string): # Set group that own promscale files -# Default is "%%GRAFANA_GROUP%%" +# Default is "%%GROUPS%%" +# promscale_args (string): +# Extra arguments for to pass to promscale +# Default is "" . /etc/rc.subr name=promscale rcvar=promscale_enable load_rc_config $name : ${promscale_enable:="NO"} : ${promscale_user:="%%USERS%%"} : ${promscale_group:="%%GROUPS%%"} +: ${promscale_args:=""} pidfile="/var/run/${name}/${name}.pid" -required_files="${promscale_config}" procname="%%PREFIX%%/bin/promscale" command="/usr/sbin/daemon" -command_args="-f -p ${pidfile} -t ${name} /usr/bin/env ${promscale_env} ${procname} ${promscale_args}" +command_args="-f -p ${pidfile} -t ${name} -T ${name} /usr/bin/env ${promscale_env} ${procname} ${promscale_args}" start_precmd="promscale_start_precmd" promscale_start_precmd() { if [ ! -d "/var/run/${name}" ]; then install -d -m 0750 -o ${promscale_user} -g ${promscale_group} "/var/run/${name}" fi } run_rc_command "$1"