bump grafana to debian 13 (#9141)

* Update default Debian version to 13

* Remove software-properties-common from dependencies

Removed installation of 'software-properties-common' from dependencies.

* Update Debian version from 12 to 13

* Changed apt-get to apt

* Changed to new func setup_deb822_repo

* Replaced ${APP} with Grafana

* Refine update_script to use deb822 repo and grafana-only upgrade

* Using cleanup_lxc

* Wrong header_info in update_script()

* Remove unnecessary line break in dependency installation

* Simplify Grafana installation script

Removed unnecessary repository setup commands and updated the script for Grafana installation.

* Update Grafana repository setup in install script

Added repository details for Grafana installation.

---------

Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com>
This commit is contained in:
Matthias Schabhüttl
2025-11-14 22:12:23 +01:00
committed by GitHub
parent e373648787
commit 022abe7ba4
3 changed files with 35 additions and 28 deletions

View File

@@ -11,7 +11,7 @@ var_cpu="${var_cpu:-1}"
var_ram="${var_ram:-512}"
var_disk="${var_disk:-2}"
var_os="${var_os:-debian}"
var_version="${var_version:-12}"
var_version="${var_version:-13}"
var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
@@ -20,19 +20,29 @@ color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -f /etc/apt/sources.list.d/grafana.list ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
header_info
check_container_storage
check_container_resources
msg_info "Updating ${APP}"
$STD apt-get update
$STD apt-get -y upgrade
msg_ok "Updated successfully!"
exit
if ! dpkg -s grafana >/dev/null 2>&1; then
msg_error "No ${APP} Installation Found!"
exit 1
fi
if [[ -f /etc/apt/sources.list.d/grafana.list ]] || [[ ! -f /etc/apt/sources.list.d/grafana.sources ]]; then
setup_deb822_repo \
"grafana" \
"https://apt.grafana.com/gpg.key" \
"https://apt.grafana.com" \
"stable" \
"main"
fi
msg_info "Updating Grafana LXC"
$STD apt update
$STD apt --only-upgrade install -y grafana
msg_ok "Updated successfully!"
exit
}
start

View File

@@ -23,7 +23,7 @@
"ram": 512,
"hdd": 2,
"os": "debian",
"version": "12"
"version": "13"
}
},
{

View File

@@ -14,26 +14,23 @@ network_check
update_os
msg_info "Installing Dependencies"
$STD apt-get install -y \
apt-transport-https \
software-properties-common
$STD apt install -y apt-transport-https
msg_ok "Installed Dependencies"
msg_info "Setting up Grafana Repository"
curl -fsSL "https://apt.grafana.com/gpg.key" -o "/usr/share/keyrings/grafana.key"
echo "deb [signed-by=/usr/share/keyrings/grafana.key] https://apt.grafana.com stable main" >/etc/apt/sources.list.d/grafana.list
msg_ok "Set up Grafana Repository"
setup_deb822_repo \
"grafana" \
"https://apt.grafana.com/gpg.key" \
"https://apt.grafana.com" \
"stable" \
"main"
msg_ok "Grafana Repository setup sucessfully"
msg_info "Installing Grafana"
$STD apt-get update
$STD apt-get install -y grafana
systemctl enable -q --now grafana-server
$STD apt install -y grafana
systemctl enable -q --now grafana-server
msg_ok "Installed Grafana"
motd_ssh
customize
msg_info "Cleaning up"
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"
cleanup_lxc