svn commit: r461439 - in head/net-mgmt/blackbox_exporter: . files
Boris Samorodov
bsam at FreeBSD.org
Sat Feb 10 22:13:33 UTC 2018
Author: bsam
Date: Sat Feb 10 22:13:30 2018
New Revision: 461439
URL: https://svnweb.freebsd.org/changeset/ports/461439
Log:
net-mgmt/blackbox_exporter: Add log file and LICENCE_FILE.
PR: 225809
Submitted by: David O'Rourke <dor.bsd at xm0.uk>
Modified:
head/net-mgmt/blackbox_exporter/Makefile
head/net-mgmt/blackbox_exporter/files/blackbox_exporter.in
Modified: head/net-mgmt/blackbox_exporter/Makefile
==============================================================================
--- head/net-mgmt/blackbox_exporter/Makefile Sat Feb 10 22:03:15 2018 (r461438)
+++ head/net-mgmt/blackbox_exporter/Makefile Sat Feb 10 22:13:30 2018 (r461439)
@@ -3,13 +3,15 @@
PORTNAME= blackbox_exporter
PORTVERSION= 0.11.0
+PORTREVISION= 1
DISTVERSIONPREFIX=v
CATEGORIES= net-mgmt
MAINTAINER= bsam at FreeBSD.org
COMMENT= Prometheus exporter for endpoints over HTTP(S), DNS, TCP and ICMP
-LICENSE= APACHE20
+LICENSE= APACHE20
+LICENSE_FILE= ${WRKSRC}/LICENSE
USES= go
USE_GITHUB= yes
Modified: head/net-mgmt/blackbox_exporter/files/blackbox_exporter.in
==============================================================================
--- head/net-mgmt/blackbox_exporter/files/blackbox_exporter.in Sat Feb 10 22:03:15 2018 (r461438)
+++ head/net-mgmt/blackbox_exporter/files/blackbox_exporter.in Sat Feb 10 22:13:30 2018 (r461439)
@@ -19,6 +19,8 @@
# Default is ":9115".
# blackbox_exporter_config (string): Set configuration file of blackbox_exporter
# Default is "%%PREFIX%%/etc/blackbox_exporter.yml".
+# blackbox_exporter_log_file (string): Set log file of blackbox_exporter
+# Default is "/var/log/blackbox_exporter.log".
. /etc/rc.subr
@@ -33,6 +35,7 @@ load_rc_config $name
: ${blackbox_exporter_args:=""}
: ${blackbox_exporter_listen_address:=":9115"}
: ${blackbox_exporter_config:="%%PREFIX%%/etc/blackbox_exporter.yml"}
+: ${blackbox_exporter_log_file:="/var/log/blackbox_exporter.log"}
pidfile=/var/run/blackbox_exporter.pid
command="/usr/sbin/daemon"
@@ -40,14 +43,24 @@ procname="%%PREFIX%%/bin/blackbox_exporter"
command_args="-p ${pidfile} /usr/bin/env ${procname} \
--web.listen-address=${blackbox_exporter_listen_address} \
--config.file=${blackbox_exporter_config} \
- ${blackbox_exporter_args}"
+ ${blackbox_exporter_args} >> ${blackbox_exporter_log_file} 2>&1"
start_precmd=blackbox_exporter_startprecmd
blackbox_exporter_startprecmd()
{
if [ ! -e ${pidfile} ]; then
- install -o ${blackbox_exporter_user} -g ${blackbox_exporter_group} /dev/null ${pidfile};
+ install \
+ -o ${blackbox_exporter_user} \
+ -g ${blackbox_exporter_group} \
+ /dev/null ${pidfile};
+ fi
+ if [ ! -e ${blackbox_exporter_log_file} ]; then
+ install \
+ -o ${blackbox_exporter_user} \
+ -g ${blackbox_exporter_group} \
+ -m 640 \
+ /dev/null ${blackbox_exporter_log_file};
fi
}
More information about the svn-ports-head
mailing list