Alertmanager: Change the way how the systemd unit file is written to disk

Co-authored-by: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com>
This commit is contained in:
Andy Grunwald 2025-01-06 17:07:02 +01:00 committed by Andy Grunwald
parent 432d12e8e4
commit 51a5e4362e
No known key found for this signature in database
GPG Key ID: 4DF3757FE7EB0B6E

View File

@ -33,7 +33,7 @@ echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
msg_ok "Installed Prometheus Alertmanager"
msg_info "Creating Service"
service_path="/etc/systemd/system/prometheus-alertmanager.service"
cat <<EOF >/etc/systemd/system/prometheus-alertmanager.service
echo "[Unit]
Description=Prometheus Alertmanager
Wants=network-online.target
@ -50,7 +50,8 @@ ExecStart=/usr/local/bin/alertmanager \
ExecReload=/bin/kill -HUP \$MAINPID
[Install]
WantedBy=multi-user.target" >$service_path
WantedBy=multi-user.target"
EOF
systemctl enable -q --now prometheus-alertmanager
msg_ok "Created Service"