mirror of
https://github.com/grafana/grafana.git
synced 2025-01-11 16:42:15 -06:00
de99ce139c
* avoid the need for a second bulky binary for grafana-cli * look for grafana-server in $PATH as well as same directory * implement unified "grafana" command * update dockerfiles, fix grafana-cli -v * update packaging to work with single binary - add wrapper scripts for grafana and grafana-server - update and sync package files - implement --sign flag of build package command - stop packaging scripts folder, they are not useful for end users - add support for --configOverrides in server command - remove unused nfpm.yaml config file * windows support
29 lines
873 B
Bash
Executable File
29 lines
873 B
Bash
Executable File
#!/usr/bin/env bash
|
|
DAEMON=grafana-server
|
|
EXECUTABLE=/usr/share/grafana/bin/grafana
|
|
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
|
|
DATASOURCECFGPATH=/usr/local/etc/grafana/datasources
|
|
DASHBOARDSCFGPATH=/usr/local/etc/grafana/dashboards
|
|
|
|
case "$1" in
|
|
start)
|
|
$EXECUTABLE server --config=$CONFIG --homepath=$HOMEPATH cfg:default.paths.datasources=$DATASOURCECFGPATH cfg:default.paths.dashboards=$DASHBOARDSCFGPATH 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
|