OP#436 add file controls
This commit is contained in:
@@ -256,6 +256,7 @@ class confdroid_nagios::params (
|
|||||||
$ng_precached_obj_file = "${ng_spool_dir}/objects.precache"
|
$ng_precached_obj_file = "${ng_spool_dir}/objects.precache"
|
||||||
$ng_status_file = "${ng_spool_dir}/status.dat"
|
$ng_status_file = "${ng_spool_dir}/status.dat"
|
||||||
$ng_command_file = "${ng_cmd_dir}/nagios.cmd"
|
$ng_command_file = "${ng_cmd_dir}/nagios.cmd"
|
||||||
|
$ng_lock_file = "${ng_run_dir}/nagios.pid"
|
||||||
|
|
||||||
## old
|
## old
|
||||||
$ng_taccgi_erb = 'confdroid_nagios/selinux/taccgi.erb'
|
$ng_taccgi_erb = 'confdroid_nagios/selinux/taccgi.erb'
|
||||||
|
|||||||
@@ -9,12 +9,53 @@ class confdroid_nagios::server::files (
|
|||||||
require confdroid_nagios::main::dirs
|
require confdroid_nagios::main::dirs
|
||||||
if $ng_nagios_server == $fqdn {
|
if $ng_nagios_server == $fqdn {
|
||||||
file { $ng_nagios_cfg_file:
|
file { $ng_nagios_cfg_file:
|
||||||
ensure => file,
|
ensure => file,
|
||||||
owner => 'nagios',
|
owner => 'nagios',
|
||||||
group => 'nagios',
|
group => 'nagios',
|
||||||
mode => '0644',
|
mode => '0644',
|
||||||
content => template($ng_nagios_cfg_erb),
|
selrange => s0,
|
||||||
notify => Service[$ng_service],
|
selrole => object_r,
|
||||||
|
seltype => nagios_etc_t,
|
||||||
|
seluser => system_u,
|
||||||
|
content => template($ng_nagios_cfg_erb),
|
||||||
|
notify => Service[$ng_service],
|
||||||
|
}
|
||||||
|
|
||||||
|
file { $ng_nagios_cgi_cfg_file:
|
||||||
|
ensure => file,
|
||||||
|
owner => 'nagios',
|
||||||
|
group => 'nagios',
|
||||||
|
mode => '0644',
|
||||||
|
selrange => s0,
|
||||||
|
selrole => object_r,
|
||||||
|
seltype => nagios_etc_t,
|
||||||
|
seluser => system_u,
|
||||||
|
content => template($ng_nagios_cgi_cfg_erb),
|
||||||
|
notify => Service[$ng_service],
|
||||||
|
}
|
||||||
|
|
||||||
|
file { $ng_nagios_resource_cfg_file:
|
||||||
|
ensure => file,
|
||||||
|
owner => 'nagios',
|
||||||
|
group => 'nagios',
|
||||||
|
mode => '0644',
|
||||||
|
selrange => s0,
|
||||||
|
selrole => object_r,
|
||||||
|
seltype => nagios_etc_t,
|
||||||
|
seluser => system_u,
|
||||||
|
content => template($ng_nagios_resource_cfg_erb),
|
||||||
|
notify => Service[$ng_service],
|
||||||
|
}
|
||||||
|
|
||||||
|
file { $ng_lock_file:
|
||||||
|
ensure => file,
|
||||||
|
owner => 'nagios',
|
||||||
|
group => 'nagios',
|
||||||
|
mode => '0644',
|
||||||
|
selrange => s0,
|
||||||
|
selrole => object_r,
|
||||||
|
seltype => nagios_var_run_t,
|
||||||
|
seluser => system_u,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,13 +36,11 @@ command_file=<%= @ng_command_file %>
|
|||||||
|
|
||||||
query_socket=<%= @ng_cmd_dir %>/nagios.qh
|
query_socket=<%= @ng_cmd_dir %>/nagios.qh
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# LOCK FILE
|
# LOCK FILE
|
||||||
# This is the lockfile that Nagios will use to store its PID number
|
# This is the lockfile that Nagios will use to store its PID number
|
||||||
# in when it is running in daemon mode.
|
# in when it is running in daemon mode.
|
||||||
|
|
||||||
lock_file=/var/run/nagios/nagios.pid
|
lock_file=<%= @ng_lock_file %>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user