#!/sbin/openrc-run

description="RRDtool data caching daemon"
pidfile=${pidfile:-/run/rrdcached/rrdcached.pid}
socket=${socket:-unix:/run/rrdcached/rrdcached.sock}
command="/usr/sbin/rrdcached"
command_args="-l $socket -j /var/lib/rrdcached/journal/ -F -b /var/lib/rrdcached/db/ -B -p $pidfile"
start_stop_daemon_args="--quiet"

depend() {
    need localmount net
    use logger
}

start_pre() {
	checkpath --directory ${pidfile%/*}
}
