Commit 7150571e by Jeremy Bingham Committed by Torkel Ödegaard

Mac grafana wrapper script (#5779)

* One of the homebrew folks first asked for a wrapper script to make launching grafana easier. Later I was asked to remove it and submit it upstream, so here it is.

* add instructions for installing grafana HEAD from git with homebrew back to the docs
parent 9a7e0eaf
......@@ -24,4 +24,17 @@ brew update
brew reinstall grafana
```
-------------
You can also install the latest unstable grafana from git:
```
brew install --HEAD grafana/grafana/grafana
```
To upgrade grafana if you've installed from HEAD:
```
brew reinstall --HEAD grafana/grafana/grafana
```
#!/usr/bin/env bash
DAEMON=grafana-server
EXECUTABLE=/usr/local/bin/grafana-server
CONFIG=/usr/local/etc/grafana/grafana.ini
HOMEPATH=/usr/local/share/grafana
LOGPATH=/usr/local/var/log/grafana
DATAPATH=/usr/local/var/lib/grafana
PLUGINPATH=/usr/local/var/lib/grafana/plugins
case "$1" in
start)
$EXECUTABLE --config=$CONFIG --homepath=$HOMEPATH cfg:default.paths.logs=$LOGPATH cfg:default.paths.data=$DATAPATH cfg:default.paths.plugins=$PLUGINPATH 2> /dev/null &
[ $? -eq 0 ] && echo "$DAEMON started"
;;
stop)
killall $DAEMON
[ $? -eq 0 ] && echo "$DAEMON stopped"
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: $0 (start|stop|restart)"
;;
esac
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment