summaryrefslogtreecommitdiffstats
path: root/zones.d/global-templates/services.conf
diff options
context:
space:
mode:
authorTobias Wiese <tobias@tobiaswiese.com>2021-02-01 23:05:46 +0100
committerTobias Wiese <tobias@tobiaswiese.com>2021-02-01 23:05:46 +0100
commitc3600595adc2035e07d554ec1acee9158fe7718a (patch)
treec2a7f4e3b07eb80064641af2c7bb17b7fc98b6e7 /zones.d/global-templates/services.conf
parentd8175633807dd2754c3bd839182ab8ac5565d6f1 (diff)
needrestart: check if a restart is required
Performing upgrades doesn't help if the outdated version is still running. Use needrestart to determine if an application is running with an outdated version if itself or a library or the system is running without an outdated kernel. Signed-off-by: Tobias Wiese <tobias@tobiaswiese.com>
Diffstat (limited to 'zones.d/global-templates/services.conf')
-rw-r--r--zones.d/global-templates/services.conf8
1 files changed, 8 insertions, 0 deletions
diff --git a/zones.d/global-templates/services.conf b/zones.d/global-templates/services.conf
index 23c2a91..2b33cbe 100644
--- a/zones.d/global-templates/services.conf
+++ b/zones.d/global-templates/services.conf
@@ -55,6 +55,14 @@ apply Service "systemd" {
assign where host.vars.init == "systemd"
}
+apply Service "needrestart" {
+ import "generic-service"
+
+ check_command = "needrestart"
+
+ assign where host.vars.kernel == "linux"
+}
+
/* OS specific basic health checks */
apply Service "apt" {
import "generic-service"