grafana: initial commit, version 7.3.6
This commit is contained in:
parent
f1bba80297
commit
86cd7351f6
2806
grafana/.footprint
Normal file
2806
grafana/.footprint
Normal file
File diff suppressed because it is too large
Load Diff
8
grafana/.signature
Normal file
8
grafana/.signature
Normal file
@ -0,0 +1,8 @@
|
||||
untrusted comment: verify with /etc/ports/contrib.pub
|
||||
RWSagIOpLGJF30tc9kp6NZhA5YfQyslHJLRQDX02b3wVm4XEP85LtEnE63bfr8hXe0OnU0L7dOvJNqkdDDY6Az5B8NKwyxazbgY=
|
||||
SHA256 (Pkgfile) = f09455cdeb2a0feec5086fcf67177a074c3386412419d3d30255c12bad4b1678
|
||||
SHA256 (.footprint) = f781a3f7a3f84a632669e521cdea5b2166c40d911191b3ef7921b697315426e8
|
||||
SHA256 (grafana-7.3.6.tar.gz) = 865535b2dff64d4bb5a40d02c462f5cd39f5956f2f2e71464cc40b37e7ec74ac
|
||||
SHA256 (grafana-7.3.6.linux-amd64.tar.gz) = 2eb4e5a2aa3990a5299fd40b41a1fedf8fad53a8dfb144b60d804d9cc6b384ba
|
||||
SHA256 (grafana.confd) = 302e0281dea67cde2edd1e7d06bd7abf6a8b335595c050ffa874cb1c1bd19036
|
||||
SHA256 (grafana.service) = ee5ed6ff04600dcd2ecc432c7f915d9caf17f3f00c60e516636a38f4e5d282aa
|
34
grafana/Pkgfile
Normal file
34
grafana/Pkgfile
Normal file
@ -0,0 +1,34 @@
|
||||
# Description: The analytics platform for all your metrics
|
||||
# URL: https://grafana.com/
|
||||
# Maintainer: Tim Biermann, tbier at posteo dot de
|
||||
# Depends on: fontconfig freetype2 go npm
|
||||
|
||||
name=grafana
|
||||
version=7.3.6
|
||||
release=1
|
||||
source=(https://github.com/grafana/grafana/archive/v$version/$name-$version.tar.gz
|
||||
https://dl.grafana.com/oss/release/grafana-$version.linux-amd64.tar.gz
|
||||
grafana.confd grafana.service)
|
||||
|
||||
build() {
|
||||
cd $name-$version
|
||||
|
||||
sed -ri 's,^(\s*data\s*=).*,\1 /var/lib/grafana,' conf/defaults.ini
|
||||
sed -ri 's,^(\s*plugins\s*=).*,\1 /var/lib/grafana/plugins,' conf/defaults.ini
|
||||
sed -ri 's,^(\s*provisioning\s*=).*,\1 /var/lib/grafana/conf/provisioning,' conf/defaults.ini
|
||||
sed -ri 's,^(\s*logs\s*=).*,\1 /var/log/grafana,' conf/defaults.ini
|
||||
|
||||
local ldflags="-X main.version=$version -X main.commit=$version -X main.buildstamp=1607529777"
|
||||
go build -ldflags "$ldflags" -v github.com/grafana/grafana/pkg/cmd/grafana-server
|
||||
go build -ldflags "$ldflags" -v github.com/grafana/grafana/pkg/cmd/grafana-cli
|
||||
|
||||
install -Dm644 $SRC/$name.confd $PKG/etc/conf.d/$name
|
||||
install -Dm755 $name-server $PKG/usr/sbin/$name-server
|
||||
install -Dm755 $name-cli $PKG/usr/bin/$name-cli
|
||||
install -Dm644 conf/sample.ini $PKG/etc/grafana.ini
|
||||
install -dm755 $PKG/usr/share/grafana
|
||||
cp -r conf public $PKG/usr/share/$name/
|
||||
|
||||
## install rc file
|
||||
install -Dm 755 $SRC/grafana.service $PKG/etc/rc.d/grafana
|
||||
}
|
8
grafana/grafana.confd
Normal file
8
grafana/grafana.confd
Normal file
@ -0,0 +1,8 @@
|
||||
GRAFANA_HOME=/var/lib/grafana
|
||||
GRAFANA_OPTS="-config /etc/grafana.ini -homepath /usr/share/grafana
|
||||
cfg:paths.data=$GRAFANA_HOME/data
|
||||
cfg:paths.plugins=$GRAFANA_HOME/plugins
|
||||
cfg:paths.provisioning=$GRAFANA_HOME/provisioning
|
||||
cfg:server.http_addr=127.0.0.1
|
||||
cfg:log.mode=syslog"
|
||||
rc_need=logger
|
35
grafana/grafana.service
Executable file
35
grafana/grafana.service
Executable file
@ -0,0 +1,35 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# /etc/rc.d/grafana: start/stop grafana daemon
|
||||
#
|
||||
|
||||
SSD=/sbin/start-stop-daemon
|
||||
PROG=/usr/sbin/grafana-server
|
||||
OPTS="--homepath /usr/share/grafana"
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
$SSD --start -b --exec $PROG -- $OPTS
|
||||
;;
|
||||
stop)
|
||||
$SSD --stop --retry 10 --exec $PROG
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
$0 start
|
||||
;;
|
||||
status)
|
||||
$SSD --status --exec $PROG
|
||||
case $? in
|
||||
0) echo "$PROG is running with pid $(pidof $PROG)" ;;
|
||||
1) echo "$PROG is not running but the pid file $PID exists" ;;
|
||||
3) echo "$PROG is not running" ;;
|
||||
4) echo "Unable to determine the program status" ;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
echo "usage: $0 [start|stop|restart|status]"
|
||||
;;
|
||||
esac
|
||||
|
||||
# End of file
|
Loading…
x
Reference in New Issue
Block a user