From 8fde4fdff64cb29122d17ef57d03d0474b36bcc4 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Thu, 24 Aug 2017 08:59:18 +0000 Subject: Added a running enforce for inetd in check_mk policy --- services/check_mk.cf | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/services/check_mk.cf b/services/check_mk.cf index ab70c5e..e83ca06 100644 --- a/services/check_mk.cf +++ b/services/check_mk.cf @@ -2,13 +2,10 @@ bundle agent check_mk { vars: freebsd:: - "data" string => '{"freebsd": true}'; "rc_conf_lines" slist => { "inetd_enable=\"YES\"", "inetd_flags=\"-wW\"", }; - !freebsd:: - "data" string => '{"freebsd": false}'; files: freebsd:: "/etc/rc.conf" @@ -33,11 +30,12 @@ bundle agent check_mk classes => if_repaired("check_mk_agent_repaired"); classes: freebsd:: + "inetd_service_running" expression => returnszero("/usr/sbin/service inetd status", "noshell"); "sshd_service_running" expression => returnszero("/usr/sbin/service sshd status", "noshell"); commands: freebsd.!sshd_service_running:: "/usr/sbin/service inetd start" classes => if_repaired("inetd_service_repaired"); - freebsd.check_mk_inetd_conf_file_repaired:: + freebsd.(!inetd_service_running|check_mk_inetd_conf_file_repaired):: "/usr/sbin/service inetd restart" classes => if_repaired("inetd_service_restarted"); reports: any:: -- cgit v1.2.3