cdist configuration management
Latest manual: https://www.cdi.st/manual/latest/
Home page: https://www.cdi.st
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.6 KiB
46 lines
1.6 KiB
#!/bin/sh -e |
|
|
|
os=$(cat "$__global/explorer/os") |
|
os_version=$(cat "$__global/explorer/os_version") |
|
|
|
require="" |
|
case $os in |
|
debian|devuan) |
|
case $os_version in |
|
8*|jessie) |
|
# Differntation not needed anymore |
|
apt_source_distribution=stable |
|
;; |
|
9*|ascii/ceres|ascii) |
|
# Differntation not needed anymore |
|
apt_source_distribution=stable |
|
;; |
|
10*) |
|
# Differntation not needed anymore |
|
apt_source_distribution=stable |
|
;; |
|
*) |
|
echo "Don't know how to install Grafana on $os $os_version. Send us a pull request!" >&2 |
|
exit 1 |
|
;; |
|
esac |
|
|
|
__apt_key_uri grafana \ |
|
--name 'Grafana Release Signing Key' \ |
|
--uri https://packages.grafana.com/gpg.key |
|
|
|
require="$require __apt_key_uri/grafana" __apt_source grafana \ |
|
--uri https://packages.grafana.com/oss/deb \ |
|
--distribution $apt_source_distribution \ |
|
--component main |
|
__package apt-transport-https |
|
require="$require __apt_source/grafana" __apt_update_index |
|
require="$require __package/apt-transport-https __apt_update_index" __package grafana |
|
require="$require __package/grafana" __start_on_boot grafana-server |
|
require="$require __start_on_boot/grafana-server" __process grafana-server --start "service grafana-server start" |
|
;; |
|
*) |
|
echo "Don't know how to install Grafana on $os. Send us a pull request!" >&2 |
|
exit 1 |
|
;; |
|
esac
|
|
|