aboutsummaryrefslogtreecommitdiff
path: root/sysutils/consul-alerts/files
diff options
context:
space:
mode:
authorKris Moore <kmoore@FreeBSD.org>2016-07-20 19:53:14 +0000
committerKris Moore <kmoore@FreeBSD.org>2016-07-20 19:53:14 +0000
commit9b4aebe868f1cf144748cd1a681a6f32e08c7b3d (patch)
treea847e11478ac73707f80670694dac6818d31f040 /sysutils/consul-alerts/files
parent0fcb865d796edf09f8f1270ce240694fb872c95a (diff)
downloadports-9b4aebe868f1cf144748cd1a681a6f32e08c7b3d.tar.gz
ports-9b4aebe868f1cf144748cd1a681a6f32e08c7b3d.zip
A highly available daemon to send notifications and reminders based on
Consul health checks. Including profile selection based on service, check, or host that enables specific handlers and reminder intervals. consul-alerts makes use of consul services to provide leader election and automatic failover amongst multiple instances. URL: https://github.com/AcalephStorage/consul-alerts PR: 211253 Submitted by: John Hixson <john@pcbsd.org>
Notes
Notes: svn path=/head/; revision=418850
Diffstat (limited to 'sysutils/consul-alerts/files')
-rw-r--r--sysutils/consul-alerts/files/consul-alerts.in32
1 files changed, 32 insertions, 0 deletions
diff --git a/sysutils/consul-alerts/files/consul-alerts.in b/sysutils/consul-alerts/files/consul-alerts.in
new file mode 100644
index 000000000000..b98dda641de7
--- /dev/null
+++ b/sysutils/consul-alerts/files/consul-alerts.in
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+# $FreeBSD$
+#
+# PROVIDE: consul-alerts
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# consul_alerts_enable (bool): Set to NO by default.
+# Set it to YES to enable consul-alerts
+# consul_alerts_env (string): Set environment variables used with consul-alerts
+# Default is "".
+
+. /etc/rc.subr
+
+name=consul_alerts
+rcvar=consul_alerts_enable
+
+load_rc_config $name
+
+: ${consul_alerts_enable:="NO"}
+: ${consul_alerts_env:=""}
+
+pidfile=/var/run/consul-alerts.pid
+procname="%%PREFIX%%/bin/consul-alerts"
+command="/usr/sbin/daemon"
+command_args="-f -p ${pidfile} /usr/bin/env ${consul_alerts_env} ${procname} start ${consul_alerts_args}"
+
+run_rc_command "$1"