Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144468863
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
4 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/net-mgmt/telegraf/Makefile b/net-mgmt/telegraf/Makefile
index 7cb09d8f9021..27f354c96959 100644
--- a/net-mgmt/telegraf/Makefile
+++ b/net-mgmt/telegraf/Makefile
@@ -1,44 +1,44 @@
PORTNAME= telegraf
DISTVERSIONPREFIX=v
-DISTVERSION= 1.37.2
+DISTVERSION= 1.37.3
CATEGORIES= net-mgmt
MAINTAINER= girgen@FreeBSD.org
COMMENT= Time-series data collection
WWW= https://influxdata.com/time-series-platform/telegraf/
LICENSE= MIT
ONLY_FOR_ARCHS= aarch64 amd64 armv6 armv7
USES= go:modules
USE_RC_SUBR= telegraf
GO_MODULE= github.com/influxdata/telegraf
GO_BUILDFLAGS= -ldflags "-X github.com/influxdata/telegraf/internal.Version=${DISTVERSION}"
GO_TARGET= ./cmd/telegraf
SUB_FILES= telegraf
SUB_LIST= TELEGRAF_USER=${TELEGRAF_USER} \
TELEGRAF_GROUP=${TELEGRAF_GROUP} \
TELEGRAF_LOGDIR=${TELEGRAF_LOGDIR}
PLIST_SUB= TELEGRAF_USER=${TELEGRAF_USER} \
TELEGRAF_GROUP=${TELEGRAF_GROUP} \
TELEGRAF_LOGDIR=${TELEGRAF_LOGDIR}
TELEGRAF_USER= telegraf
TELEGRAF_GROUP= telegraf
USERS= ${TELEGRAF_USER}
GROUPS= ${TELEGRAF_GROUP}
TELEGRAF_LOGDIR=/var/log/${PORTNAME}
post-patch:
@${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|g' ${WRKSRC}/config/config.go
post-install:
${MKDIR} ${STAGEDIR}${TELEGRAF_LOGDIR}
.include <bsd.port.mk>
diff --git a/net-mgmt/telegraf/distinfo b/net-mgmt/telegraf/distinfo
index bce7a9183b32..34e1ecbc45ce 100644
--- a/net-mgmt/telegraf/distinfo
+++ b/net-mgmt/telegraf/distinfo
@@ -1,5 +1,5 @@
-TIMESTAMP = 1770910293
-SHA256 (go/net-mgmt_telegraf/telegraf-v1.37.2/v1.37.2.mod) = 27b41045f7e46224f7bb6f411025e712c251f438f1b05cdc22347846e034be55
-SIZE (go/net-mgmt_telegraf/telegraf-v1.37.2/v1.37.2.mod) = 30496
-SHA256 (go/net-mgmt_telegraf/telegraf-v1.37.2/v1.37.2.zip) = fc9ff86bd041ad72ea1d874a5ac45896049b8fb65616e49884f807596d3c64d6
-SIZE (go/net-mgmt_telegraf/telegraf-v1.37.2/v1.37.2.zip) = 7859573
+TIMESTAMP = 1771936110
+SHA256 (go/net-mgmt_telegraf/telegraf-v1.37.3/v1.37.3.mod) = bb0351f5b16a9103b1956bbad05c44dc47aaa74d96e0c6e67e984c9027ffce54
+SIZE (go/net-mgmt_telegraf/telegraf-v1.37.3/v1.37.3.mod) = 30461
+SHA256 (go/net-mgmt_telegraf/telegraf-v1.37.3/v1.37.3.zip) = cee8d9a91e6978001d5edf511b378f92998805a161007b6d31ec453fab88c277
+SIZE (go/net-mgmt_telegraf/telegraf-v1.37.3/v1.37.3.zip) = 7869977
diff --git a/net-mgmt/telegraf/files/telegraf.in b/net-mgmt/telegraf/files/telegraf.in
index e673a12cbd86..27e4a91253c1 100644
--- a/net-mgmt/telegraf/files/telegraf.in
+++ b/net-mgmt/telegraf/files/telegraf.in
@@ -1,79 +1,84 @@
#!/bin/sh
# PROVIDE: telegraf
# REQUIRE: DAEMON NETWORKING
# BEFORE: LOGIN
# KEYWORD: shutdown
# Add the following lines to /etc/rc.conf to enable telegrafb:
# telegraf_enable="YES"
#
# telegraf_enable (bool): Set to YES to enable telegraf
# Default: NO
# telegraf_conf (str): telegraf configuration file
# Default: ${PREFIX}/etc/telegraf.conf
# telegraf_confdir (str): telegraf configuration directory
# Default: none
# telegraf_user (str): telegraf daemon user
# Default: %%TELEGRAF_USER%%
# telegraf_group (str): telegraf daemon group
# Default: %%TELEGRAF_GROUP%%
# telegraf_flags (str): Extra flags passed to telegraf
# Default: --quiet
. /etc/rc.subr
PATH=${PATH}:%%LOCALBASE%%/sbin:%%LOCALBASE%%/bin
name="telegraf"
rcvar=telegraf_enable
load_rc_config $name
: ${telegraf_enable:="NO"}
: ${telegraf_user:="%%TELEGRAF_USER%%"}
: ${telegraf_group:="%%TELEGRAF_GROUP%%"}
: ${telegraf_flags:="--quiet"}
: ${telegraf_conf:="%%PREFIX%%/etc/${name}.conf"}
: ${telegraf_confdir:=""}
: ${telegraf_options:="${telegraf_flags} --config=${telegraf_conf}"}
if [ -n "${telegraf_confdir}" ]; then
telegraf_options="${telegraf_options} --config-directory=${telegraf_confdir}"
fi
logfile="%%TELEGRAF_LOGDIR%%/${name}.log"
pidfile="/var/run/${name}.pid"
command=/usr/sbin/daemon
start_precmd="telegraf_prestart"
start_cmd="telegraf_start"
stop_cmd="telegraf_stop"
telegraf_prestart()
{
if [ ! -r "${telegraf_conf}" ]; then
- echo WARNING: missing ${telegraf} configuration. Start aborted.
+ echo WARNING: missing ${name} configuration. Start aborted.
+ exit 1
+ fi
+ install -d -o ${telegraf_user} -g ${telegraf_group} -m 750 %%TELEGRAF_LOGDIR%%
+ if ! %%PREFIX%%/bin/${name} --test ${telegraf_options} > /dev/null 2>&1; then
+ echo WARNING: failing to start ${name} ${telegraf_options}
+ echo Try running ${name} --test ${telegraf_options}
exit 1
fi
- install -d -o ${telegraf_user} -g ${telegraf_group} -m750 %%TELEGRAF_LOGDIR%%
}
telegraf_start()
{
echo "Starting ${name}"
/usr/sbin/daemon -fcr -P ${pidfile} -u ${telegraf_user} -o ${logfile} \
%%PREFIX%%/bin/${name} ${telegraf_options}
}
telegraf_stop()
{
pid=$(check_pidfile $pidfile $command)
if [ -n "${pid}" ]; then
echo "Stopping ${name} (pid=${pid})"
kill -- -${pid}
wait_for_pids ${pid}
else
echo "${name} isn't running"
fi
}
run_rc_command "$1"
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Mon, Mar 30, 5:26 PM (7 h, 5 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28225124
Default Alt Text
(4 KB)
Attached To
Mode
R11 FreeBSD ports repository
Attached
Detach File
Event Timeline
Log In to Comment