Skip to content

Commit

Permalink
fix(node-exporter): improve restart on core update
Browse files Browse the repository at this point in the history
  • Loading branch information
gsanchietti committed Feb 25, 2025
1 parent 8f98e1e commit cae398e
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ exec 1>&2
set -e

if systemctl is-active --quiet node_exporter ; then
systemctl try-restart node_exporter.service || :
systemctl restart node_exporter.service || :
else
echo "Upgrade Promtail as core service:"
systemctl disable --now $(ls -1 /etc/systemd/system/node_exporter[1-9]*.service | xargs -- basename)
echo "Upgrade node_exporter as core service:"
systemctl disable --now $(ls -1 /etc/systemd/system/node_exporter[1-9]+.service | xargs -- basename)
systemctl enable --now node_exporter.service
fi

0 comments on commit cae398e

Please sign in to comment.