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 38136bd
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ 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)
systemctl enable --now node_exporter.service
fi

0 comments on commit 38136bd

Please sign in to comment.