From 5f4f78d55d832d31639119804e7ff9f69ecdda41 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Sun, 27 Aug 2017 23:31:08 +0200 Subject: Updated usebundle system to include caller information un report --- services/applications/bareos_fd.cf | 4 ++-- services/applications/check_mk.cf | 2 +- services/applications/fcgiwrap.cf | 17 +++++++++++------ services/applications/nagios.cf | 2 +- services/applications/sshd.cf | 2 +- 5 files changed, 16 insertions(+), 11 deletions(-) (limited to 'services/applications') diff --git a/services/applications/bareos_fd.cf b/services/applications/bareos_fd.cf index 3b16a91..9286c9a 100644 --- a/services/applications/bareos_fd.cf +++ b/services/applications/bareos_fd.cf @@ -16,8 +16,8 @@ bundle agent bareos_fd "bareos_fd_service_running" expression => returnszero("/usr/sbin/service bareos-fd status", "noshell"); methods: freebsd:: - "any" usebundle => install_package("$(bareos_fd.packages)"); - "any" usebundle => add_rc_conf_line("$(bareos_fd.rc_conf_lines)"); + "freebsd" usebundle => install_package("$(this.bundle)", "$(bareos_fd.packages)"); + "freebsd" usebundle => add_rc_conf_line("$(this.bundle)", "$(bareos_fd.rc_conf_lines)"); files: freebsd:: "/usr/local/etc/bareos/bareos-fd.d/client/myself.conf" diff --git a/services/applications/check_mk.cf b/services/applications/check_mk.cf index 0731eaa..8a1ce82 100644 --- a/services/applications/check_mk.cf +++ b/services/applications/check_mk.cf @@ -27,7 +27,7 @@ bundle agent check_mk "inetd_service_running" expression => returnszero("/usr/sbin/service inetd status", "noshell"); methods: freebsd:: - "any" usebundle => add_rc_conf_line("$(check_mk.rc_conf_lines)"); + "freebsd" usebundle => add_rc_conf_line("$(this.bundle)", "$(check_mk.rc_conf_lines)"); commands: freebsd.!inetd_service_running:: "/usr/sbin/service inetd start" classes => if_repaired("inet_service_repaired"); diff --git a/services/applications/fcgiwrap.cf b/services/applications/fcgiwrap.cf index 7c491c0..7c9c809 100644 --- a/services/applications/fcgiwrap.cf +++ b/services/applications/fcgiwrap.cf @@ -1,11 +1,16 @@ bundle agent fcgiwrap(user, group, mode) { + vars: + freebsd:: + "rc_conf_lines" slist => { + "fcgiwrap_enable=\"YES\"", + "fcgiwrap_user=\"$(user)\"", + "fcgiwrap_socket_mode=\"$(mode)\"", + "fcgiwrap_socket_owner=\"$(user)\"", + "fcgiwrap_socket_group=\"$(group)\"", + }; methods: freebsd:: - "any" usebundle => install_package("fcgiwrap"); - "any" usebundle => add_rc_conf_line("fcgiwrap_enable=\"YES\""); - "any" usebundle => add_rc_conf_line("fcgiwrap_user=\"$(user)\""); - "any" usebundle => add_rc_conf_line("fcgiwrap_mode=\"$(mode)\""); - "any" usebundle => add_rc_conf_line("fcgiwrap_owner=\"$(user)\""); - "any" usebundle => add_rc_conf_line("fcgiwrap_group=\"$(group)\""); + "freebsd" usebundle => install_package("$(this.bundle)", "fcgiwrap"); + "freebsd" usebundle => add_rc_conf_line("$(this.bundle)", "$(fcgiwrap.rc_conf_lines)"); } diff --git a/services/applications/nagios.cf b/services/applications/nagios.cf index 156fdfb..a664bb5 100644 --- a/services/applications/nagios.cf +++ b/services/applications/nagios.cf @@ -9,5 +9,5 @@ bundle agent nagios }; methods: nagios:: - "any" usebundle => fcgiwrap("nagios", "www", "770"); + "nagios" usebundle => fcgiwrap("nagios", "www", "770"); } diff --git a/services/applications/sshd.cf b/services/applications/sshd.cf index 1b5bca7..b3bfa33 100644 --- a/services/applications/sshd.cf +++ b/services/applications/sshd.cf @@ -17,7 +17,7 @@ bundle agent sshd "sshd_service_running" expression => returnszero("/usr/sbin/service sshd status", "noshell"); methods: freebsd:: - "any" usebundle => add_rc_conf_line("sshd_enable=\"YES\""); + "freebsd" usebundle => add_rc_conf_line("$(this.bundle)", "sshd_enable=\"YES\""); commands: freebsd.!sshd_service_running:: "/usr/sbin/service sshd start" classes => if_repaired("sshd_service_repaired"); -- cgit v1.2.3