diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-03-27 22:40:05 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-03-27 22:40:05 +0100 |
commit | 8c364c784966be1700ea39ae45028f3e9be9cae0 (patch) | |
tree | c1971211069b79e3831b71accd52a67a9fdc77a3 /net-analyzer/kapacitor/files/kapacitor.rc | |
parent | 6bd95d1f6320b8666a31ec949183aaa3088aa16f (diff) |
gentoo resync : 27.03.2018
Diffstat (limited to 'net-analyzer/kapacitor/files/kapacitor.rc')
-rw-r--r-- | net-analyzer/kapacitor/files/kapacitor.rc | 35 |
1 files changed, 35 insertions, 0 deletions
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 +} |