#!/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 $command_user -m755 $GRAFANA_HOME \ $GRAFANA_HOME/provisioning \ $GRAFANA_HOME/provisioning/dashboards \ $GRAFANA_HOME/provisioning/datasources \ $GRAFANA_HOME/provisioning/notifiers checkpath -f -o $command_user -m 640 ${GRAFANA_CONFIG:-/etc/grafana.ini} }