#!/sbin/openrc-run
supervisor=supervise-daemon
name="Grafana"
description="Metrics Dashboard and Graph Editor"
command="/usr/sbin/grafana-server"
command_args="$GRAFANA_OPTS"
command_user=grafana:grafana
depend() {
need net
after firewall
}
start_pre() {
checkpath -d -o grafana:grafana -m755 $GRAFANA_HOME \
$GRAFANA_HOME/provisioning \
$GRAFANA_HOME/provisioning/dashboards \
$GRAFANA_HOME/provisioning/datasources \
$GRAFANA_HOME/provisioning/notifiers
}