Index: head/textproc/consul-template/Makefile =================================================================== --- head/textproc/consul-template/Makefile (revision 561924) +++ head/textproc/consul-template/Makefile (revision 561925) @@ -1,72 +1,73 @@ # $FreeBSD$ PORTNAME= consul-template PORTVERSION= 0.25.1 +PORTREVISION= 1 DISTVERSIONPREFIX= v CATEGORIES= textproc MAINTAINER= swills@FreeBSD.org COMMENT= Generic template rendering and notifications with Consul LICENSE= MPL20 USES= go:modules USE_GITHUB= yes GH_TUPLE= hashicorp:${PORTNAME}:${DISTVERSIONPREFIX}${PORTVERSION}:DEFAULT/src/github.com/hashicorp/consul-template \ BurntSushi:toml:v0.3.1:burntsushi_toml/vendor/github.com/BurntSushi/toml \ armon:go-metrics:ec5e00d3c878:armon_go_metrics/vendor/github.com/armon/go-metrics \ davecgh:go-spew:v1.1.1:davecgh_go_spew/vendor/github.com/davecgh/go-spew \ fatih:color:v1.9.0:fatih_color/vendor/github.com/fatih/color \ go-yaml:yaml:v2.2.8:go_yaml_yaml/vendor/gopkg.in/yaml.v2 \ golang:crypto:4def268fd1a4:golang_crypto/vendor/golang.org/x/crypto \ golang:net:ca1201d0de80:golang_net/vendor/golang.org/x/net \ golang:snappy:v0.0.1:golang_snappy/vendor/github.com/golang/snappy \ golang:sys:9fbb57f87de9:golang_sys/vendor/golang.org/x/sys \ golang:text:v0.3.2:golang_text/vendor/golang.org/x/text \ golang:time:9d24e82272b4:golang_time/vendor/golang.org/x/time \ hashicorp:consul:v0.4.0:hashicorp_consul_sdk/vendor/github.com/hashicorp/consul/sdk \ hashicorp:consul:api/v1.4.0:hashicorp_consul_api/vendor/github.com/hashicorp/consul \ hashicorp:errwrap:v1.0.0:hashicorp_errwrap/vendor/github.com/hashicorp/errwrap \ hashicorp:go-cleanhttp:v0.5.1:hashicorp_go_cleanhttp/vendor/github.com/hashicorp/go-cleanhttp \ hashicorp:go-gatedio:v0.5.0:hashicorp_go_gatedio/vendor/github.com/hashicorp/go-gatedio \ hashicorp:go-hclog:v0.12.0:hashicorp_go_hclog/vendor/github.com/hashicorp/go-hclog \ hashicorp:go-immutable-radix:v1.1.0:hashicorp_go_immutable_radix/vendor/github.com/hashicorp/go-immutable-radix \ hashicorp:go-multierror:v1.0.0:hashicorp_go_multierror/vendor/github.com/hashicorp/go-multierror \ hashicorp:go-retryablehttp:v0.5.4:hashicorp_go_retryablehttp/vendor/github.com/hashicorp/go-retryablehttp \ hashicorp:go-rootcerts:v1.0.2:hashicorp_go_rootcerts/vendor/github.com/hashicorp/go-rootcerts \ hashicorp:go-sockaddr:v1.0.2:hashicorp_go_sockaddr/vendor/github.com/hashicorp/go-sockaddr \ hashicorp:go-syslog:v1.0.0:hashicorp_go_syslog/vendor/github.com/hashicorp/go-syslog \ hashicorp:go-uuid:v1.0.1:hashicorp_go_uuid/vendor/github.com/hashicorp/go-uuid \ hashicorp:golang-lru:v0.5.3:hashicorp_golang_lru/vendor/github.com/hashicorp/golang-lru \ hashicorp:hcl:v1.0.0:hashicorp_hcl/vendor/github.com/hashicorp/hcl \ hashicorp:logutils:v1.0.0:hashicorp_logutils/vendor/github.com/hashicorp/logutils \ hashicorp:serf:v0.8.3:hashicorp_serf/vendor/github.com/hashicorp/serf \ hashicorp:vault:0dc007d98cc8:hashicorp_vault_sdk/vendor/github.com/hashicorp/vault \ hashicorp:vault:746c0b111519:hashicorp_vault_api \ mattn:go-colorable:v0.1.4:mattn_go_colorable/vendor/github.com/mattn/go-colorable \ mattn:go-isatty:v0.0.12:mattn_go_isatty/vendor/github.com/mattn/go-isatty \ mattn:go-shellwords:v1.0.5:mattn_go_shellwords/vendor/github.com/mattn/go-shellwords \ mitchellh:go-homedir:v1.1.0:mitchellh_go_homedir/vendor/github.com/mitchellh/go-homedir \ mitchellh:go-testing-interface:v1.0.0:mitchellh_go_testing_interface/vendor/github.com/mitchellh/go-testing-interface \ mitchellh:hashstructure:v1.0.0:mitchellh_hashstructure/vendor/github.com/mitchellh/hashstructure \ mitchellh:mapstructure:v1.1.2:mitchellh_mapstructure/vendor/github.com/mitchellh/mapstructure \ pierrec:lz4:v2.2.5:pierrec_lz4/vendor/github.com/pierrec/lz4 \ pkg:errors:v0.8.1:pkg_errors/vendor/github.com/pkg/errors \ pmezard:go-difflib:v1.0.0:pmezard_go_difflib/vendor/github.com/pmezard/go-difflib \ ryanuber:go-glob:v1.0.0:ryanuber_go_glob/vendor/github.com/ryanuber/go-glob \ square:go-jose:v2.3.1:square_go_jose/vendor/gopkg.in/square/go-jose.v2 \ stretchr:testify:v1.4.0:stretchr_testify/vendor/github.com/stretchr/testify GO_BUILDFLAGS= -ldflags='\ -s -w -X github.com/hashicorp/consul-template/version.Name=${PORTNAME} \ -X github.com/hashicorp/consul-template/version.GitCommit=release' PLIST_FILES= bin/consul-template USE_RC_SUBR= consul-template post-extract: @${RM} -r ${WRKSRC}/vendor/github.com/hashicorp/vault/api @${RLN} ${WRKSRC_hashicorp_vault_api}/api ${WRKSRC}/vendor/github.com/hashicorp/vault/api .include Index: head/textproc/consul-template/files/consul-template.in =================================================================== --- head/textproc/consul-template/files/consul-template.in (revision 561924) +++ head/textproc/consul-template/files/consul-template.in (revision 561925) @@ -1,51 +1,69 @@ #!/bin/sh # $FreeBSD$ # # PROVIDE: consul_template # REQUIRE: NETWORKING SERVERS DAEMON # KEYWORD: shtudown # # Add the following lines to /etc/rc.conf.local or /etc/rc.conf # to enable this service: # # consul_template_enable (bool): Set to NO by default. # Set it to YES to enable consul-template. # consul_template_user (user): Set user to run consul-template. # Default is "root". # consul_template_group (group): Set group to run consul-template. # Default is "wheel". # consul_template_env (string): Set environment variables used with consul-template. # Default is "". # consul_template_args (string): Set flags used with consul-template. # Default is "". +# consul_template_syslog_output_enable (string): Set to YES to enable syslog output +# Default is "NO". See daemon(8). +# consul_template_syslog_output_priority (str): Set syslog priority if syslog enabled. +# Default is "info". See daemon(8). +# consul_template_syslog_output_facility (str): Set syslog facility if syslog enabled. +# Default is "daemon". See daemon(8). . /etc/rc.subr name=consul_template rcvar=consul_template_enable load_rc_config $name : ${consul_template_enable:="NO"} : ${consul_template_user:="root"} : ${consul_template_group:="wheel"} : ${consul_template_env:=""} : ${consul_template_args:=""} +: ${consul_template_syslog_output_enable:="NO"} +if checkyesno consul_template_syslog_output_enable; then + consul_template_syslog_output_flags="-T ${name}" + if [ -n "${consul_template_syslog_output_priority}" ]; then + consul_template_syslog_output_flags="${consul_template_syslog_output_flags} -s ${consul_template_syslog_output_priority}" + fi + + if [ -n "${consul_template_syslog_output_facility}" ]; then + consul_template_syslog_output_flags="${consul_template_syslog_output_flags} -l ${consul_template_syslog_output_facility}" + fi +fi + pidfile=/var/run/consul-template.pid procname="%%PREFIX%%/bin/consul-template" command="/usr/sbin/daemon" -command_args="-f -p ${pidfile} /usr/bin/env ${consul_template_env} ${procname} -config=%%PREFIX%%/etc/consul-template.d ${consul_template_args}" +command_args="-f -t ${name} ${consul_template_syslog_output_flags} -p ${pidfile} /usr/bin/env ${consul_template_env} ${procname} -config=%%PREFIX%%/etc/consul-template.d ${consul_template_args}" sig_stop="INT" start_precmd=consul_template_startprecmd consul_template_startprecmd() { if [ ! -e ${pidfile} ]; then install -o ${consul_template_user} -g ${consul_template_group} /dev/null ${pidfile} fi } run_rc_command "$1"