From 4c7327e81462d11d7ba53bf6c38a990f12549c84 Mon Sep 17 00:00:00 2001 From: Kamila Souckova Date: Fri, 9 Jun 2017 18:40:47 +0200 Subject: [PATCH] consider de(bi|vu)an version --- cdist/conf/type/__grafana_dashboard/manifest | 29 +++++++++++++------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/cdist/conf/type/__grafana_dashboard/manifest b/cdist/conf/type/__grafana_dashboard/manifest index c5bc78d2..b6e3020e 100644 --- a/cdist/conf/type/__grafana_dashboard/manifest +++ b/cdist/conf/type/__grafana_dashboard/manifest @@ -1,20 +1,29 @@ os=$(cat $__global/explorer/os) +os_version=$(cat $__global/explorer/os_version) case $os in debian|devuan) - __apt_key_uri grafana \ - --name 'Grafana Release Signing Key' \ - --uri https://packagecloud.io/gpg.key + case $os_version in + 8*|jessie) + __apt_key_uri grafana \ + --name 'Grafana Release Signing Key' \ + --uri https://packagecloud.io/gpg.key - require="__apt_key_uri/grafana" __apt_source grafana \ - --uri https://packagecloud.io/grafana/stable/debian/ \ - --distribution jessie \ - --component main + require="__apt_key_uri/grafana" __apt_source grafana \ + --uri https://packagecloud.io/grafana/stable/debian/ \ + --distribution jessie \ + --component main - __package apt-transport-https + __package apt-transport-https - require="__apt_source/grafana __package/apt-transport-https" __package grafana - require="__package/grafana" __start_on_boot grafana-server + require="__apt_source/grafana __package/apt-transport-https" __package grafana + require="__package/grafana" __start_on_boot grafana-server + ;; + *) + echo "Don't know how to install Grafana on $os $os_version. Send us a pull request!" + exit 1 + ;; + esac ;; *) echo "Don't know how to install Grafana on $os. Send us a pull request!"