From 471b63471b5d75b56fdb2f2b583c914e94cb94b1 Mon Sep 17 00:00:00 2001 From: Nico Suhl Date: Sun, 5 Mar 2017 18:48:07 +0100 Subject: add telegraf 1.2.1 --- dev-db/telegraf/Manifest | 1 + dev-db/telegraf/files/telegraf.init.d | 31 +++++++++++++++++++++++++++++ dev-db/telegraf/metadata.xml | 11 +++++++++++ dev-db/telegraf/telegraf-1.2.1.ebuild | 37 +++++++++++++++++++++++++++++++++++ 4 files changed, 80 insertions(+) create mode 100644 dev-db/telegraf/Manifest create mode 100755 dev-db/telegraf/files/telegraf.init.d create mode 100644 dev-db/telegraf/metadata.xml create mode 100644 dev-db/telegraf/telegraf-1.2.1.ebuild diff --git a/dev-db/telegraf/Manifest b/dev-db/telegraf/Manifest new file mode 100644 index 0000000..d0648ba --- /dev/null +++ b/dev-db/telegraf/Manifest @@ -0,0 +1 @@ +DIST telegraf_1.2.1_amd64.deb 9637426 SHA256 001d9ee9185526420cb7092a5ebc35af91090b5633e992da4d8cfa7e4c2d0c3d SHA512 100d59a35b850f9d80574427ee0d7091cbbc094860f7acfadfa73c2aeeb13ef7465596d6a5e1e42bcd71447426ac4aad1a9a07879f87804b5406a32fcde80334 WHIRLPOOL 62f63dbf5feb0f10b1045bd56e800fe2f3e222baf62f210fc1df6f4661a0e02915367531db911617513fd0030a0bfb1f48563914b1fdacfbcfca50c4d355ec3c diff --git a/dev-db/telegraf/files/telegraf.init.d b/dev-db/telegraf/files/telegraf.init.d new file mode 100755 index 0000000..2dc945e --- /dev/null +++ b/dev-db/telegraf/files/telegraf.init.d @@ -0,0 +1,31 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +depend() { + need net + after bootmisc +} + +start() { + ebegin "Starting telegraf" + + start-stop-daemon --start -b \ + --user telegraf:telegraf \ + --pidfile /run/telegraf.pid \ + --make-pidfile \ + --stdout /var/log/telegraf/telegraf.log \ + --stderr /var/log/telegraf/telegraf.log \ + --exec /usr/bin/telegraf + eend $? +} + +stop() { + ebegin "Stopping telegraf" + + start-stop-daemon --stop \ + --pidfile /run/telegraf.pid \ + --exec /usr/bin/telegraf + eend $? +} diff --git a/dev-db/telegraf/metadata.xml b/dev-db/telegraf/metadata.xml new file mode 100644 index 0000000..c1a328f --- /dev/null +++ b/dev-db/telegraf/metadata.xml @@ -0,0 +1,11 @@ + + + + + nico@overninethousand.de + + + Telegraf is an agent written in Go for collecting metrics and writing them + into InfluxDB or other possible outputs. + + diff --git a/dev-db/telegraf/telegraf-1.2.1.ebuild b/dev-db/telegraf/telegraf-1.2.1.ebuild new file mode 100644 index 0000000..94024bb --- /dev/null +++ b/dev-db/telegraf/telegraf-1.2.1.ebuild @@ -0,0 +1,37 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +inherit user unpacker + +DESCRIPTION="A plugin-driven server agent for reporting metrics into InfluxDB" +HOMEPAGE="http://influxdb.com" +SRC_URI="https://dl.influxdata.com/telegraf/releases/${PN}_${PV}_amd64.deb" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" +RESTRICT="mirror" + +DEPEND="" +RDEPEND="${DEPEND}" + +pkg_setup() { + enewgroup ${PN} + enewuser ${PN} -1 -1 -1 ${PN} +} + +src_unpack() { + mkdir -p ${WORKDIR}/${P} + cd ${WORKDIR}/${P} + unpack_deb ${A} +} + +src_install() { + cp -Rp * "${D}" + newinitd "${FILESDIR}/${PN}.init.d" "${PN}" + fowners ${PN}:${PN} /var/log/${PN} +} -- cgit v1.2.3-65-gdbad