summaryrefslogtreecommitdiff
path: root/net-analyzer/kapacitor/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-03-27 22:40:05 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-03-27 22:40:05 +0100
commit8c364c784966be1700ea39ae45028f3e9be9cae0 (patch)
treec1971211069b79e3831b71accd52a67a9fdc77a3 /net-analyzer/kapacitor/files
parent6bd95d1f6320b8666a31ec949183aaa3088aa16f (diff)
gentoo resync : 27.03.2018
Diffstat (limited to 'net-analyzer/kapacitor/files')
-rw-r--r--net-analyzer/kapacitor/files/kapacitor.confd12
-rw-r--r--net-analyzer/kapacitor/files/kapacitor.rc35
2 files changed, 47 insertions, 0 deletions
diff --git a/net-analyzer/kapacitor/files/kapacitor.confd b/net-analyzer/kapacitor/files/kapacitor.confd
new file mode 100644
index 000000000000..d58906ae3e7a
--- /dev/null
+++ b/net-analyzer/kapacitor/files/kapacitor.confd
@@ -0,0 +1,12 @@
+#The convention in this file is to show the default setting commented
+#out.
+#To change the setting, uncomment it then change the value.
+
+#This is the kapacitor error log:
+#error_log="/var/log/kapacitor/kapacitor.log"
+
+#This is the kapacitor output log:
+#output_log="/dev/null"
+
+# Extra options to pass to kapacitord:
+#kapacitor_opts=""
diff --git a/net-analyzer/kapacitor/files/kapacitor.rc b/net-analyzer/kapacitor/files/kapacitor.rc
new file mode 100644
index 000000000000..b89d0b1cbf92
--- /dev/null
+++ b/net-analyzer/kapacitor/files/kapacitor.rc
@@ -0,0 +1,35 @@
+#!/sbin/openrc-run
+
+config=/etc/kapacitor/kapacitor.conf
+pidfile=/var/run/kapacitord.pid
+command=/usr/bin/kapacitord
+command_args="-config ${config} ${kapacitor_opts}"
+command_background=yes
+make_pidfile=yes
+command_user="kapacitor:kapacitor"
+
+# Logging
+error_log="${error_log:-/var/log/kapacitor/kapacitor.err}"
+output_log="${output_log:-/dev/null}"
+
+# Max open files
+rc_ulimit="-n 65536"
+
+depend() {
+ after net
+}
+
+start_pre() {
+ # Check if config file exist
+ if [ ! -r ${config} ]; then
+ eerror "config file ${config} doesn't exist"
+ return 1
+ fi
+ if [ ! -f "$error_log" ]; then
+ mkdir -p "$(dirname $error_log)"
+ fi
+ if [ ! -f "$output_log" ]; then
+ mkdir -p "$(dirname $output_log)"
+ fi
+ return 0
+}