diff --git a/net-mgmt/py-gstat_exporter/Makefile b/net-mgmt/py-gstat_exporter/Makefile index 0690baafef49..9e32f448177e 100644 --- a/net-mgmt/py-gstat_exporter/Makefile +++ b/net-mgmt/py-gstat_exporter/Makefile @@ -1,31 +1,32 @@ PORTNAME= gstat_exporter DISTVERSION= 0.2.0 +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= net-mgmt python MASTER_SITES= PYPI PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= lapo@lapo.it COMMENT= Prometheus exporter for gstat data WWW= https://github.com/tykling/gstat_exporter LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}prometheus-client>=0.7.1:net-mgmt/py-prometheus-client@${PY_FLAVOR} USES= python USE_RC_SUBR= gstat_exporter -NO_BUILD= yes NO_ARCH= yes +NO_BUILD= yes SUB_LIST= PYTHON_CMD=${PYTHON_CMD} PLIST_FILES= bin/${PORTNAME}.py do-install: ${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME}.py ${STAGEDIR}${PREFIX}/bin ${REINPLACE_CMD} -i '' -e "1i\\${.newline}#!${PYTHON_CMD}" ${STAGEDIR}${PREFIX}/bin/${PORTNAME}.py .include diff --git a/net-mgmt/py-gstat_exporter/files/gstat_exporter.in b/net-mgmt/py-gstat_exporter/files/gstat_exporter.in index 42afc2e24d2c..cec6d3663104 100644 --- a/net-mgmt/py-gstat_exporter/files/gstat_exporter.in +++ b/net-mgmt/py-gstat_exporter/files/gstat_exporter.in @@ -1,27 +1,29 @@ #!/bin/sh # PROVIDE: gstat_exporter # REQUIRE: LOGIN NETWORKING # KEYWORD: shutdown # Add the following lines to /etc/rc.conf to enable gstat_exporter: # # gstat_exporter_enable (bool): Set to "NO" by default. # Set it to "YES" to enable gstat_exporter_enable. +# gstat_exporter_args (string): Set to "" by default. +# Set additional command line arguments . /etc/rc.subr name=gstat_exporter rcvar=gstat_exporter_enable desc="gstat_exporter daemon" load_rc_config ${name} : ${gstat_exporter_enable:=NO} pidfile="/var/run/${name}.pid" command_interpreter=%%PYTHON_CMD%% command=%%PREFIX%%/bin/${name}.py -start_cmd="/usr/sbin/daemon -f -p ${pidfile} $command_interpreter $command" +start_cmd="/usr/sbin/daemon -f -p ${pidfile} $command_interpreter $command ${gstat_exporter_args}" run_rc_command "$1"