Index: head/sysutils/snmp_exporter/Makefile =================================================================== --- head/sysutils/snmp_exporter/Makefile (revision 472548) +++ head/sysutils/snmp_exporter/Makefile (revision 472549) @@ -1,37 +1,37 @@ # $FreeBSD$ PORTNAME= snmp_exporter -PORTVERSION= 0.9.0 +PORTVERSION= 0.11.0 DISTVERSIONPREFIX=v CATEGORIES= sysutils MAINTAINER= fabian.freyer@physik.tu-berlin.de COMMENT= SNMP Exporter for Prometheus LICENSE= APACHE20 LIB_DEPENDS= libnetsnmp.so:net-mgmt/net-snmp USES= go USE_GITHUB= yes USE_RC_SUBR= snmp_exporter GH_ACCOUNT= prometheus GO_PKGNAME= github.com/${GH_ACCOUNT}/${PORTNAME} GO_TARGET= github.com/${GH_ACCOUNT}/${PORTNAME} do-build: (cd ${GO_WRKSRC}; ${SETENV} ${MAKE_ENV} ${GO_ENV} ${GO_CMD} install -v ${GO_TARGET}) (cd ${GO_WRKSRC}/generator; ${SETENV} ${MAKE_ENV} ${GO_ENV} ${GO_CMD} install -v ${GO_TARGET}/generator) post-patch: @${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|g' ${GO_WRKSRC}/generator/main.go do-install: ${MKDIR} ${STAGEDIR}${PREFIX}/etc/snmp_exporter/ ${INSTALL_DATA} ${FILESDIR}/generator.yml ${STAGEDIR}${PREFIX}/etc/snmp_exporter/generator.yml ${INSTALL_PROGRAM} ${WRKDIR}/bin/snmp_exporter ${STAGEDIR}${PREFIX}/bin ${INSTALL_PROGRAM} ${WRKDIR}/bin/generator ${STAGEDIR}${PREFIX}/bin/snmp_exporter_generator .include Index: head/sysutils/snmp_exporter/distinfo =================================================================== --- head/sysutils/snmp_exporter/distinfo (revision 472548) +++ head/sysutils/snmp_exporter/distinfo (revision 472549) @@ -1,3 +1,3 @@ -TIMESTAMP = 1519669975 -SHA256 (prometheus-snmp_exporter-v0.9.0_GH0.tar.gz) = ac508e8cda680cc46638c68fe71a91df012e3274fb99460fd2866637b51591fd -SIZE (prometheus-snmp_exporter-v0.9.0_GH0.tar.gz) = 3257207 +TIMESTAMP = 1529088276 +SHA256 (prometheus-snmp_exporter-v0.11.0_GH0.tar.gz) = 2cf17de907fef1cf8b352b3adf61dfdc575102b9adae1de5186b2fc88e62faee +SIZE (prometheus-snmp_exporter-v0.11.0_GH0.tar.gz) = 3631252 Index: head/sysutils/snmp_exporter/files/snmp_exporter.in =================================================================== --- head/sysutils/snmp_exporter/files/snmp_exporter.in (revision 472548) +++ head/sysutils/snmp_exporter/files/snmp_exporter.in (revision 472549) @@ -1,61 +1,59 @@ #!/bin/sh # $FreeBSD$ # PROVIDE: snmp_exporter # REQUIRE: LOGIN # KEYWORD: shutdown # # Add the following lines to /etc/rc.conf.local or /etc/rc.conf # to enable this service: # # snmp_exporter_enable (bool): Set to NO by default. # Set it to YES to enable snmp_exporter. # snmp_exporter_user (string): Set user that snmp_exporter will run under # Default is "nobody". # snmp_exporter_group (string): Set group that snmp_exporter will run under # Default is "nobody". # snmp_exporter_args (string): Set extra arguments to pass to snmp_exporter # Default is "". # snmp_exporter_listen_address (string):Set ip:port that snmp_exporter will listen on # Default is ":9116". # snmp_exporter_config_file (string) Set the location of the snmp_exporter config # configuration file. # Default is "%%PREFIX%%/etc/snmp_exporter/snmp.yml" . /etc/rc.subr name=snmp_exporter rcvar=snmp_exporter_enable load_rc_config $name : ${snmp_exporter_enable:="NO"} : ${snmp_exporter_user:="nobody"} : ${snmp_exporter_group:="nobody"} : ${snmp_exporter_args:=""} : ${snmp_exporter_listen_address:=":9116"} : ${snmp_exporter_config_file:="%%PREFIX%%/etc/snmp_exporter/snmp.yml"} pidfile=/var/run/snmp_exporter.pid command="/usr/sbin/daemon" procname="%%PREFIX%%/bin/snmp_exporter" -command_args="-p ${pidfile} /usr/bin/env ${procname} \ +command_args="-p ${pidfile} -T ${name} \ + /usr/bin/env ${procname} \ --web.listen-address=${snmp_exporter_listen_address} \ --config.file=${snmp_exporter_config_file} \ ${snmp_exporter_args}" start_precmd=snmp_exporter_startprecmd snmp_exporter_startprecmd() { if [ ! -e ${pidfile} ]; then install -o ${snmp_exporter_user} -g ${snmp_exporter_group} /dev/null ${pidfile}; - fi - if [ ! -d ${snmp_exporter_textfile_dir} ]; then - install -d -o ${snmp_exporter_user} -g ${snmp_exporter_group} -m 1755 ${snmp_exporter_textfile_dir} fi } load_rc_config $name run_rc_command "$1"