From 53108049984371b30a39f2b1d6eb0b6fbf7eabe9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yavuz=20Ayd=C4=B1n?= Date: Wed, 6 Oct 2021 15:58:58 +0200 Subject: [PATCH] Initial commit for restart_service --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index e9409c3..54e1304 100644 --- a/README.md +++ b/README.md @@ -8,3 +8,14 @@ to check if a reboot is required and also list packages that requires reboot #### stat_net.pl Plugin for checking network errors and statictics + +#### restart_service +Event command to restart a service. Restaring a service will require sudo privileges on systemctl / service binaries. Add the following to `/etc/sudoers` on the client machine: +``` +icinga ALL=(ALL) NOPASSWD: /bin/systemctl restart * +icinga ALL=(ALL) NOPASSWD: /usr/bin/systemctl restart * +icinga ALL=(ALL) NOPASSWD: /sbin/service * restart +icinga ALL=(ALL) NOPASSWD: /usr/sbin/service * restart +``` + +If your Icinga2 client runs as a different user adjust as necessary. \ No newline at end of file