#!/bin/sh

# PROVIDE: influxdb
# REQUIRE: DAEMON
# KEYWORD: shutdown

if [ -f /etc/rc.subr ]
then
        . /etc/rc.subr
fi

name="influxdb"
rcvar=$name
influxdb_user="influxdb"
influxdb_group="influxdb"
influxdb_chdir="/var/lib/influxdb"
pidfile="/var/lib/influxdb/data/influxdb.pid"
STDERR="/var/log/influxdb/influxdb.log"
command="/usr/pkg/bin/influxd"
command_args="-config /usr/pkg/etc/influxdb/config.toml -pidfile ${pidfile} 1>/dev/null 2>> $STDERR &"

load_rc_config $name
run_rc_command "$1"
