From 7b24babfab8e55500c53fae6da366f09d98904de Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Wed, 12 Jun 2024 19:03:11 -0500 Subject: [PATCH] r/collectd-version: Auto-restart service Sometimes, the `collectd-version` script crashes or fails to start at boot. Configuring systemd to automatically restart it will ensure that it's always running, so machines' versions are consistently inventoried. --- roles/collectd-version/files/collectd-version.service | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/roles/collectd-version/files/collectd-version.service b/roles/collectd-version/files/collectd-version.service index c711b5d..ee482ee 100644 --- a/roles/collectd-version/files/collectd-version.service +++ b/roles/collectd-version/files/collectd-version.service @@ -2,10 +2,14 @@ Description=collectd version plugin BindsTo=collectd.service After=collectd.service +StartLimitInterval=1s +StartLimitBurst=10 [Service] ExecStart=/usr/local/libexec/collectd-version RemainAfterExit=true +Restart=always +RestartSec=500ms [Install] WantedBy=collectd.service