diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
commit | 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch) | |
tree | 7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-db/influxdb/files/influxdb.rc | |
parent | 30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff) |
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-db/influxdb/files/influxdb.rc')
-rw-r--r-- | dev-db/influxdb/files/influxdb.rc | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/dev-db/influxdb/files/influxdb.rc b/dev-db/influxdb/files/influxdb.rc new file mode 100644 index 000000000000..4d18def5e508 --- /dev/null +++ b/dev-db/influxdb/files/influxdb.rc @@ -0,0 +1,34 @@ +#!/sbin/openrc-run + +config=/etc/influxdb/influxd.conf +pidfile=/var/run/influxd.pid +command=/usr/bin/influxd +command_args="-config ${config} -pidfile ${pidfile} ${influxd_opts}" +command_args="-config ${config} ${influxd_opts}" +command_background=yes +make_pidfile=yes +command_user="influxdb:influxdb" +retry=SIGTERM/30/SIGKILL/10 +wait=1000 + +# Logging +error_log="${error_log:-/var/log/influxdb/influxd.log}" +output_log="${output_log:-/dev/null}" + +# Max open files +rc_ulimit="-n 65536" + +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 +} |