Index: head/net-mgmt/nsd_exporter/Makefile =================================================================== --- head/net-mgmt/nsd_exporter/Makefile (revision 494952) +++ head/net-mgmt/nsd_exporter/Makefile (revision 494953) @@ -1,54 +1,55 @@ # Created by: Ryan Steinmetz # $FreeBSD$ PORTNAME= nsd_exporter PORTVERSION= 0.1.0 +PORTREVISION= 1 CATEGORIES= net-mgmt MAINTAINER= zi@FreeBSD.org COMMENT= Prometheus exporter for nsd metrics LICENSE= BSD3CLAUSE USES= go USE_GITHUB= yes GH_ACCOUNT= optix2000 GH_TUPLE= prometheus:client_golang:v0.8.0:client_golang \ prometheus:client_model:5c3871d:client_model \ prometheus:procfs:ae68e2d:procfs \ prometheus:common:7600349:common \ beorn7:perks:3a771d9:perks \ golang:protobuf:70b3af3:protobuf \ matttproud:golang_protobuf_extensions:c12348c:golang_protobuf_extensions \ optix2000:go-nsdctl:ce14b32:go_nsdctl \ go-yaml:yaml:7f97868:go_yaml GO_PKGNAME= github.com/${GH_ACCOUNT}/${PORTNAME} GO_TARGET= github.com/${GH_ACCOUNT}/${PORTNAME} PLIST_FILES= bin/nsd_exporter USE_RC_SUBR= nsd_exporter post-patch: ${REINPLACE_CMD} -e 's|"/etc|"${LOCALBASE}/etc|g' ${WRKSRC_go_nsdctl}/nsdctl.go pre-build: ${MKDIR} ${GO_WRKDIR_SRC}/github.com/prometheus ${GO_WRKDIR_SRC}/gopkg.in \ ${GO_WRKDIR_SRC}/github.com/beorn7 ${GO_WRKDIR_SRC}/github.com/golang \ ${GO_WRKDIR_SRC}/github.com/matttproud ${GO_WRKDIR_SRC}/github.com/optix2000 ${MV} ${WRKSRC_golang_protobuf_extensions} ${GO_WRKDIR_SRC}/github.com/matttproud/golang_protobuf_extensions ${MV} ${WRKSRC_go_nsdctl} ${GO_WRKDIR_SRC}/github.com/optix2000/go-nsdctl ${MV} ${WRKSRC_client_golang} ${GO_WRKDIR_SRC}/github.com/prometheus/client_golang ${MV} ${WRKSRC_client_model} ${GO_WRKDIR_SRC}/github.com/prometheus/client_model ${MV} ${WRKSRC_procfs} ${GO_WRKDIR_SRC}/github.com/prometheus/procfs ${MV} ${WRKSRC_common} ${GO_WRKDIR_SRC}/github.com/prometheus/common ${MV} ${WRKSRC_protobuf} ${GO_WRKDIR_SRC}/github.com/golang/protobuf ${MV} ${WRKSRC_go_yaml} ${GO_WRKDIR_SRC}/gopkg.in/yaml.v2 ${MV} ${WRKSRC_perks} ${GO_WRKDIR_SRC}/github.com/beorn7/perks do-install: ${INSTALL_PROGRAM} ${WRKDIR}/bin/nsd_exporter ${STAGEDIR}${PREFIX}/bin .include Index: head/net-mgmt/nsd_exporter/files/nsd_exporter.in =================================================================== --- head/net-mgmt/nsd_exporter/files/nsd_exporter.in (revision 494952) +++ head/net-mgmt/nsd_exporter/files/nsd_exporter.in (revision 494953) @@ -1,63 +1,63 @@ #!/bin/sh # PROVIDE: nsd_exporter # REQUIRE: LOGIN # KEYWORD: shutdown # # Add the following lines to /etc/rc.conf.local or /etc/rc.conf # to enable this service: # # nsd_exporter_enable (bool): Set to NO by default. # Set it to YES to enable nsd_exporter. # nsd_exporter_user (string): Set user that nsd_exporter will run under # Default is "nobody". # nsd_exporter_group (string): Set group that nsd_exporter will run under # Default is "nobody". # nsd_exporter_args (string): Set extra arguments to pass to nsd_exporter # Default is "". # nsd_exporter_listen_address (string):Set ip:port that nsd_exporter will listen on # Default is ":9132". . /etc/rc.subr name=nsd_exporter rcvar=nsd_exporter_enable load_rc_config $name : ${nsd_exporter_enable:="NO"} : ${nsd_exporter_user:="nobody"} : ${nsd_exporter_group:="nobody"} : ${nsd_exporter_args:=""} : ${nsd_exporter_listen_address:=":9132"} : ${nsd_exporter_control_cert:="%%LOCALBASE%%/etc/nsd/nsd_control.pem"} : ${nsd_exporter_control_ca:="%%LOCALBASE%%/etc/nsd/nsd_server.pem"} : ${nsd_exporter_control_key:="%%LOCALBASE%%/etc/nsd/nsd_control.key"} : ${nsd_exporter_nsd_address:="127.0.0.1:8952"} : ${nsd_exporter_restart_delay:="10"} pidfile=/var/run/nsd_exporter.pid command="/usr/sbin/daemon" -procname="%%PREFIX%%/bin/nsd_exporter" -command_args="-rp ${pidfile} -S -R ${nsd_exporter_restart_delay} \ - -T ${name} ${procname} \ +nsd_exporter_command="%%PREFIX%%/bin/nsd_exporter" +command_args="-rP ${pidfile} -S -R ${nsd_exporter_restart_delay} \ + -T ${name} ${nsd_exporter_command} \ -cert ${nsd_exporter_control_cert} \ -ca ${nsd_exporter_control_ca} \ -key ${nsd_exporter_control_key} \ -nsd-address ${nsd_exporter_nsd_address} \ -listen-address ${nsd_exporter_listen_address} \ ${nsd_exporter_args}" required_files="${nsd_exporter_control_cert} ${nsd_exporter_control_ca} ${nsd_exporter_control_key}" start_precmd=nsd_exporter_startprecmd nsd_exporter_startprecmd() { if [ ! -e ${pidfile} ]; then install -o ${nsd_exporter_user} -g ${nsd_exporter_group} /dev/null ${pidfile}; fi } load_rc_config $name run_rc_command "$1"