Address review comments, stop/start loki and promtail services during update

This commit is contained in:
hoholms 2025-12-12 02:11:57 +02:00
parent 747d0904c0
commit 2798c23dca

View File

@ -29,20 +29,24 @@ function update_script() {
exit 1 exit 1
fi fi
if [[ -f /etc/apt/sources.list.d/grafana.list ]] || [[ ! -f /etc/apt/sources.list.d/grafana.sources ]]; then msg_info "Stopping Loki"
setup_deb822_repo \ systemctl stop loki
"grafana" \ systemctl stop promtail
"https://apt.grafana.com/gpg.key" \ msg_ok "Stopped Loki"
"https://apt.grafana.com" \
"stable" \
"main"
fi
msg_info "Updating Loki LXC" msg_info "Updating Loki"
$STD apt update $STD apt update
$STD apt --only-upgrade install -y loki $STD apt --only-upgrade install -y loki
$STD apt --only-upgrade install -y promtail $STD apt --only-upgrade install -y promtail
msg_ok "Updated successfully!" msg_ok "Updated Loki"
msg_info "Starting Loki"
systemctl start loki
systemctl start promtail
msg_ok "Started Loki"
msg_ok "Update Successful"
exit exit
} }