mirror of
https://github.com/YunoHost-Apps/grafana_ynh.git
synced 2024-09-03 20:36:29 +02:00
Change: do not use grafana repo, but direct URL to
deb file, so that the installed version is the one specified in _common.sh
This commit is contained in:
parent
f1f5217205
commit
05541f04d0
2 changed files with 51 additions and 3 deletions
|
@ -5,11 +5,39 @@
|
|||
#=================================================
|
||||
|
||||
# Debian package version for Grafana
|
||||
GRAFANA_VERSION="8.0.7"
|
||||
GRAFANAVERSION="8.0.7"
|
||||
|
||||
# dependencies used by the app
|
||||
pkg_dependencies="influxdb"
|
||||
|
||||
ARCHITECTURE=$(dpkg --print-architecture)
|
||||
|
||||
#arm64
|
||||
sha256_arm64=ebfa946af9e5414a9dd9cfc83cb6973fbfb366b81790f19d9dd0fd563142282d
|
||||
|
||||
#armv6
|
||||
sha256_armhf_v6=78ae6990b3d4787f825278300c5779bcc1c89e5cb8ccbf6d7040aab421bb9948
|
||||
|
||||
#armv7
|
||||
sha256_armhf=5b24999e1da04a6031ecca1a1a95386f87b4b23bbd0c59f61ebeea18557b5877
|
||||
|
||||
#amd64
|
||||
sha256_amd64=ddfdd290c94768c2538b8546fd6c0ed2a0f0d2f3a5501e73a97f18edf4b9a167
|
||||
|
||||
url=https://dl.grafana.com/enterprise/release/grafana-enterprise_${GRAFANAVERSION}_$ARCHITECTURE.deb
|
||||
|
||||
url_armv6=https://dl.grafana.com/enterprise/release/grafana-enterprise-rpi_${GRAFANAVERSION}_$ARCHITECTURE.deb
|
||||
|
||||
if [ -n "$(uname -m | grep armv6)" ]
|
||||
then
|
||||
grafana_deb_url="$url_armv6"
|
||||
sha256sum=sha256_armhf_v6
|
||||
else
|
||||
grafana_deb_url="$url"
|
||||
sha256sumvar=sha256_${ARCHITECTURE}
|
||||
sha256sum=${!sha256sumvar}
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# PERSONAL HELPERS
|
||||
#=================================================
|
||||
|
|
|
@ -61,10 +61,30 @@ ynh_app_setting_set --app=$app --key=port --value=$port
|
|||
#=================================================
|
||||
# INSTALL DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Installing dependencies..." --weight=44
|
||||
ynh_script_progression --message="Installing dependencies..." --weight=22
|
||||
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
ynh_install_extra_app_dependencies --repo="deb https://packages.grafana.com/oss/deb stable main" --package="grafana" --key="https://packages.grafana.com/gpg.key"
|
||||
|
||||
#=================================================
|
||||
# DOWNLOAD AND INSTALL GRAFANA DEB PACKAGE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Downloading Grafana..." --weight=11
|
||||
|
||||
temp_folder="$(mktemp -d)"
|
||||
|
||||
grafana_deb_dst="$temp_folder/grafana_deb.deb"
|
||||
|
||||
if [ -n "$(uname -m | grep armv6)" ]
|
||||
then
|
||||
grafana_deb_url="$url_armv6"
|
||||
else
|
||||
grafana_deb_url="$url"
|
||||
fi
|
||||
|
||||
ynh_exec_quiet "wget -q -O $grafana_deb_dst $grafana_deb_url"
|
||||
|
||||
ynh_script_progression --message="Installing Grafana..." --weight=11
|
||||
DEBIAN_FRONTEND=noninteractive ynh_exec_warn_less dpkg --force-confold -i $grafana_deb_dst
|
||||
|
||||
#=================================================
|
||||
# CREATE A MYSQL DATABASE
|
||||
|
|
Loading…
Add table
Reference in a new issue