From ef7c9d108771f9fa70d24d3c2166c9bd6585f893 Mon Sep 17 00:00:00 2001 From: Andy Grunwald Date: Mon, 6 Jan 2025 07:46:36 +0100 Subject: [PATCH] Alertmanager: Switch to `/opt` before updating release --- ct/prometheus-alertmanager.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/prometheus-alertmanager.sh b/ct/prometheus-alertmanager.sh index a09f5458..3407ed5a 100644 --- a/ct/prometheus-alertmanager.sh +++ b/ct/prometheus-alertmanager.sh @@ -39,11 +39,11 @@ function update_script() { msg_ok "Stopped ${APP}" msg_info "Updating ${APP} to v${RELEASE}" + cd /opt wget -q https://github.com/prometheus/alertmanager/releases/download/v${RELEASE}/alertmanager-${RELEASE}.linux-amd64.tar.gz tar -xf alertmanager-${RELEASE}.linux-amd64.tar.gz cd alertmanager-${RELEASE}.linux-amd64 cp -rf alertmanager amtool /usr/local/bin/ - cd ~ rm -rf alertmanager-${RELEASE}.linux-amd64 alertmanager-${RELEASE}.linux-amd64.tar.gz echo "${RELEASE}" >/opt/${APP}_version.txt msg_ok "Updated ${APP} to ${RELEASE}"