[dev-db/influxdb] bump from Gentoo PR

thats a whole lot of untested right there.
This commit is contained in:
2019-12-08 16:32:52 +01:00
parent cea1b9b6d8
commit d6046a1119
6 changed files with 465 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
#!/sbin/openrc-run
config="${config:-/etc/influxdb/influxdb.conf}"
supervisor="supervise-daemon"
command=/usr/bin/influxd
command_args="-config ${config} -pidfile ${pidfile} ${influxd_opts}"
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
}