Skip to content

Commit 022abe7

Browse files
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 <[email protected]>
1 parent e373648 commit 022abe7

File tree

3 files changed

+36
-29
lines changed

3 files changed

+36
-29
lines changed

ct/grafana.sh

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ var_cpu="${var_cpu:-1}"
1111
var_ram="${var_ram:-512}"
1212
var_disk="${var_disk:-2}"
1313
var_os="${var_os:-debian}"
14-
var_version="${var_version:-12}"
14+
var_version="${var_version:-13}"
1515
var_unprivileged="${var_unprivileged:-1}"
1616

1717
header_info "$APP"
@@ -20,19 +20,29 @@ color
2020
catch_errors
2121

2222
function update_script() {
23-
header_info
24-
check_container_storage
25-
check_container_resources
26-
if [[ ! -f /etc/apt/sources.list.d/grafana.list ]]; then
27-
msg_error "No ${APP} Installation Found!"
28-
exit
29-
fi
30-
31-
msg_info "Updating ${APP}"
32-
$STD apt-get update
33-
$STD apt-get -y upgrade
34-
msg_ok "Updated successfully!"
35-
exit
23+
header_info
24+
check_container_storage
25+
check_container_resources
26+
27+
if ! dpkg -s grafana >/dev/null 2>&1; then
28+
msg_error "No ${APP} Installation Found!"
29+
exit 1
30+
fi
31+
32+
if [[ -f /etc/apt/sources.list.d/grafana.list ]] || [[ ! -f /etc/apt/sources.list.d/grafana.sources ]]; then
33+
setup_deb822_repo \
34+
"grafana" \
35+
"https://apt.grafana.com/gpg.key" \
36+
"https://apt.grafana.com" \
37+
"stable" \
38+
"main"
39+
fi
40+
41+
msg_info "Updating Grafana LXC"
42+
$STD apt update
43+
$STD apt --only-upgrade install -y grafana
44+
msg_ok "Updated successfully!"
45+
exit
3646
}
3747

3848
start

frontend/public/json/grafana.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"ram": 512,
2424
"hdd": 2,
2525
"os": "debian",
26-
"version": "12"
26+
"version": "13"
2727
}
2828
},
2929
{

install/grafana-install.sh

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,26 +14,23 @@ network_check
1414
update_os
1515

1616
msg_info "Installing Dependencies"
17-
$STD apt-get install -y \
18-
apt-transport-https \
19-
software-properties-common
17+
$STD apt install -y apt-transport-https
2018
msg_ok "Installed Dependencies"
2119

2220
msg_info "Setting up Grafana Repository"
23-
curl -fsSL "https://apt.grafana.com/gpg.key" -o "/usr/share/keyrings/grafana.key"
24-
echo "deb [signed-by=/usr/share/keyrings/grafana.key] https://apt.grafana.com stable main" >/etc/apt/sources.list.d/grafana.list
25-
msg_ok "Set up Grafana Repository"
21+
setup_deb822_repo \
22+
"grafana" \
23+
"https://apt.grafana.com/gpg.key" \
24+
"https://apt.grafana.com" \
25+
"stable" \
26+
"main"
27+
msg_ok "Grafana Repository setup sucessfully"
2628

2729
msg_info "Installing Grafana"
28-
$STD apt-get update
29-
$STD apt-get install -y grafana
30-
systemctl enable -q --now grafana-server
30+
$STD apt install -y grafana
31+
systemctl enable -q --now grafana-server
3132
msg_ok "Installed Grafana"
3233

3334
motd_ssh
3435
customize
35-
36-
msg_info "Cleaning up"
37-
$STD apt-get -y autoremove
38-
$STD apt-get -y autoclean
39-
msg_ok "Cleaned"
36+
cleanup_lxc

0 commit comments

Comments
 (0)