#!/sbin/openrc-run

pidfile=/run/$RC_SVCNAME.pid
command=/usr/sbin/influxd
command_args="${INFLUXDB_OPTS}"
command_background="yes"
command_user="${command_user:-influxdb:influxdb}"

depend() {
	need net
	after firewall
}

start_pre() {
	checkpath -d -o "$command_user" -m755 "${data_path:-/var/lib/influxdb}"
}
