diff options
| author | Tobias Wiese <tobias@tobiaswiese.com> | 2021-02-01 23:05:46 +0100 |
|---|---|---|
| committer | Tobias Wiese <tobias@tobiaswiese.com> | 2021-02-01 23:05:46 +0100 |
| commit | c3600595adc2035e07d554ec1acee9158fe7718a (patch) | |
| tree | c2a7f4e3b07eb80064641af2c7bb17b7fc98b6e7 /zones.d/global-templates/commands.conf | |
| parent | d8175633807dd2754c3bd839182ab8ac5565d6f1 (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/commands.conf')
| -rw-r--r-- | zones.d/global-templates/commands.conf | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/zones.d/global-templates/commands.conf b/zones.d/global-templates/commands.conf index 1fe8b56..22d7c8b 100644 --- a/zones.d/global-templates/commands.conf +++ b/zones.d/global-templates/commands.conf @@ -1,3 +1,26 @@ object CheckCommand "systemd" { command = [ PluginDir + "/check_systemd" ] } + +object CheckCommand "needrestart" { + command = [ "/usr/bin/sudo", "/usr/sbin/needrestart", "-p" ] + + arguments = { + "-v" = { + set_if = "$needrestart_verbose$" + description = "Show details for debugging" + } + "-k" = { + set_if = "$needrestart_limit_kernel$" + description = "Limit to checking for obsolete kernel" + } + "-l" = { + set_if = "$needrestart_limit_libraries$" + description = "Limit to checking for obsolete libraries" + } + } + + vars.needrestart_verbose = false + vars.needrestart_limit_kernel = false + vars.needrestart_limit_libraries = false +} |
