Uses library functions to install
This commit is contained in:
parent
cb0dfb9bc4
commit
178449e8e3
47
rspamd.cf
47
rspamd.cf
|
@ -9,7 +9,7 @@ vars:
|
|||
"local.d/milter_headers.conf",
|
||||
# "local.d/actions.conf",
|
||||
"local.d/worker-normal.inc",
|
||||
# "local.d/worker-proxy.inc",
|
||||
"local.d/worker-proxy.inc",
|
||||
# "local.d/worker-controller.inc",
|
||||
# "local.d/classifier-bayes.conf",
|
||||
# "local.d/worker-fuzzy.inc",
|
||||
|
@ -29,53 +29,28 @@ vars:
|
|||
"service_name" string => "rspamd";
|
||||
"root_user" string => "root";
|
||||
"root_group" string => "root";
|
||||
packages:
|
||||
freebsd::
|
||||
"$(rspamd.pkgs)"
|
||||
policy => "present",
|
||||
package_module => pkg,
|
||||
handle => "rspamd_pkg_installed",
|
||||
classes => if_repaired(rspamd_changed);
|
||||
debian::
|
||||
"$(rspamd.pkgs)"
|
||||
policy => "present",
|
||||
package_module => apt_get,
|
||||
handle => "rspamd_pkg_installed",
|
||||
classes => if_repaired(rspamd_changed);
|
||||
fedora|centos::
|
||||
"$(rspamd.pkgs)"
|
||||
policy => "present",
|
||||
package_module => yum,
|
||||
handle => "rspamd_pkg_installed",
|
||||
classes => if_repaired(rspamd_changed);
|
||||
|
||||
|
||||
methods:
|
||||
"any" usebundle => wmde_install_packages(@(pkgs),"rspamd");
|
||||
"any" usebundle => wmde_service("$(service_name)","rspamd_kept","rspamd_repaired"),
|
||||
depends_on => {"rspamd_cfgs_done"};
|
||||
files:
|
||||
"$(cfg_dir)/."
|
||||
perms => uperm("$(root_user)","$(root_group)","755"),
|
||||
depends_on => { "rspamd_pkg_installed" },
|
||||
depends_on => { "rspamd_pkgs_installed" },
|
||||
handle => "rspamd_cfg_dir_created";
|
||||
|
||||
"$(cfg_dir)/$(cfgfiles)"
|
||||
create => "true",
|
||||
edit_template => "$(sys.workdir)/inputs/$(def.wmde_libdir)/templates/rspamd/$(cfgfiles).mustache",
|
||||
template_method => "mustache",
|
||||
perms => uperm("$(root_user)","$(root_group)","644"),
|
||||
perms => m("644"),
|
||||
template_data => bundlestate("$(this.bundle)"),
|
||||
depends_on => { "rspamd_pkg_installed","rspamd_cfg_dir_created" },
|
||||
classes => if_repaired(rspamd_restart),
|
||||
depends_on => { "rspamd_pkgs_installed","rspamd_cfg_dir_created" },
|
||||
classes => if_repaired(rspamd_repaired),
|
||||
handle => "rspamd_cfgs_done";
|
||||
|
||||
|
||||
services:
|
||||
"$(service_name)"
|
||||
service_policy => "start",
|
||||
depends_on => { "rspamd_cfgs_done" },
|
||||
handle => "rspamd_running";
|
||||
|
||||
rspamd_restart::
|
||||
"$(service_name)"
|
||||
service_policy => "restart",
|
||||
depends_on => { "rspamd_running", "rspamd_cfgs_done"};
|
||||
|
||||
reports:
|
||||
# "RSPAMD: $(cfgjs)";
|
||||
# "RSJ: $(worker_normalx)";
|
||||
|
|
Loading…
Reference in New Issue