Alertmanager: Switch to /opt before updating release

This commit is contained in:
Andy Grunwald 2025-01-06 07:46:36 +01:00
parent 17ed517972
commit ef7c9d1087
No known key found for this signature in database
GPG Key ID: 4DF3757FE7EB0B6E

View File

@ -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}"