blob: dc810d925ee11dad2bac0c82c1a6ff122f6d6988 [file] [log] [blame]
#!/bin/bash
# Builds and uploads a debian package for grains.
APPNAME=grains
DESCRIPTION="The Grafana/InfluxDB proxy server."
# Local defines
GRAFANA=grafana-1.9.0
# Copy files into the right locations in ${ROOT}.
copy_release_files()
{
INSTALL="sudo install -D --verbose --backup=none --group=root --owner=root"
INSTALL_DIR="sudo install -d --verbose --backup=none --group=root --owner=root"
${INSTALL} --mode=755 -T ${GOPATH}/bin/grains ${ROOT}/usr/local/bin/grains
${INSTALL} --mode=666 -T ./sys/monit ${ROOT}/etc/monit/conf.d/grains
${INSTALL} --mode=755 -T ./sys/init ${ROOT}/etc/init.d/grains
${INSTALL_DIR} --mode=777 ${ROOT}/usr/local/share/skiagrains/grafana
curl http://grafanarel.s3.amazonaws.com/${GRAFANA}.tar.gz | sudo tar -C ${ROOT}/usr/local/share/skiagrains/grafana --strip-components=1 -xzf -
${INSTALL} --mode=666 -T ./grafana-config.js ${ROOT}/usr/local/share/skiagrains/grafana/config.js
}
source ../bash/release.sh