Fxied some bugs regarding starting and restarting service
This commit is contained in:
parent
34d722c981
commit
2f6eb07cc8
98
apache.cf
98
apache.cf
|
@ -140,30 +140,13 @@ vars:
|
||||||
freebsd::
|
freebsd::
|
||||||
"pkgs" slist => {"mod_php$(php.bsdvs)"};
|
"pkgs" slist => {"mod_php$(php.bsdvs)"};
|
||||||
debian::
|
debian::
|
||||||
"pkgs" slist => {"libapache2-mod-php"};
|
"pkgs" slist => {"libapache2-mod-php$(php.version)"};
|
||||||
centos::
|
centos::
|
||||||
"pkgs" slist => {"libapache2-mod-php"};
|
"pkgs" slist => {"libapache2-mod-php"};
|
||||||
|
|
||||||
packages:
|
methods:
|
||||||
freebsd::
|
"any" usebundle => wmde_install_packages(@(pkgs),"apache_php"),
|
||||||
"$(pkgs)"
|
handle => "apache_php_installed";
|
||||||
policy => "present",
|
|
||||||
package_module => pkg,
|
|
||||||
handle => "apache_php_installed",
|
|
||||||
classes => if_repaired(apache_changed);
|
|
||||||
debian::
|
|
||||||
"$(pkgs)"
|
|
||||||
policy => "present",
|
|
||||||
package_module => apt_get,
|
|
||||||
handle => "apache_php_installed",
|
|
||||||
depends_on => { "apache_mpm_event_disabled" },
|
|
||||||
classes => if_repaired(apache_changed);
|
|
||||||
fedora|centos::
|
|
||||||
"$(pkgs)"
|
|
||||||
policy => "present",
|
|
||||||
package_module => yum,
|
|
||||||
handle => "apache_php_installed",
|
|
||||||
classes => if_repaired(apache_changed);
|
|
||||||
|
|
||||||
commands:
|
commands:
|
||||||
debian|ubuntu::
|
debian|ubuntu::
|
||||||
|
@ -171,46 +154,27 @@ commands:
|
||||||
args => "-c '/usr/sbin/a2dismod mpm_event > /dev/null'",
|
args => "-c '/usr/sbin/a2dismod mpm_event > /dev/null'",
|
||||||
inform=>"false",
|
inform=>"false",
|
||||||
handle => "apache_mpm_event_disabled";
|
handle => "apache_mpm_event_disabled";
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bundle agent install_apache(raw)
|
bundle agent install_apache(raw)
|
||||||
{
|
{
|
||||||
classes:
|
|
||||||
|
|
||||||
packages:
|
|
||||||
freebsd::
|
|
||||||
"$(apache.pkgs)"
|
|
||||||
policy => "present",
|
|
||||||
handle => "apache_pkgs_installed",
|
|
||||||
package_module => pkg,
|
|
||||||
classes => if_repaired(apache_changed);
|
|
||||||
debian::
|
|
||||||
"$(apache.pkgs)"
|
|
||||||
policy => "present",
|
|
||||||
package_module => apt_get,
|
|
||||||
handle => "apache_pkgs_installed",
|
|
||||||
classes => if_repaired(apache_changed);
|
|
||||||
fedora|centos::
|
|
||||||
"$(apache.pkgs)"
|
|
||||||
policy => "present",
|
|
||||||
package_module => yum,
|
|
||||||
handle => "apache_pkgs_installed",
|
|
||||||
classes => if_repaired(apache_changed);
|
|
||||||
methods:
|
methods:
|
||||||
|
|
||||||
|
"any" usebundle => wmde_install_packages(@(apache.pkgs),"apache");
|
||||||
|
|
||||||
"any" usebundle => install_apache_php,
|
"any" usebundle => install_apache_php,
|
||||||
depends_on => { "apache_pkgs_installed" };
|
depends_on => { "apache_pkgs_installed" };
|
||||||
commands:
|
|
||||||
# freebsd::
|
#services:
|
||||||
# "/usr/sbin/sysrc"
|
## apache_kept::
|
||||||
# handle => "apache_editrc",
|
# "$(apache.service_name)"
|
||||||
# args => "apache24_enable=yes",
|
# service_policy => "start";
|
||||||
# inform=>"false";
|
|
||||||
# debian|centos::
|
|
||||||
# any::
|
|
||||||
# "/bin/true" handle => "apache_editrc",
|
reports:
|
||||||
# inform => "false";
|
|
||||||
|
|
||||||
files:
|
files:
|
||||||
"$(apache.log_dir)/."
|
"$(apache.log_dir)/."
|
||||||
|
@ -241,21 +205,25 @@ files:
|
||||||
create => "true",
|
create => "true",
|
||||||
edit_template => "$(sys.workdir)/inputs/$(def.wmde_libdir)/templates/httpd.conf.mustache",
|
edit_template => "$(sys.workdir)/inputs/$(def.wmde_libdir)/templates/httpd.conf.mustache",
|
||||||
template_method => "mustache",
|
template_method => "mustache",
|
||||||
handle => "apache_main_cfg_crreated",
|
handle => "apache_main_cfg_created",
|
||||||
depends_on => { "apache_pkgs_installed","apache_php_installed" },
|
depends_on => { "apache_pkgs_installed","apache_php_installed" },
|
||||||
classes => if_repaired(apache_changed);
|
classes => if_repaired(apache_repaired);
|
||||||
|
|
||||||
services:
|
methods:
|
||||||
# apache_editrs depends
|
|
||||||
"$(apache.service_name)"
|
"any" usebundle => wmde_service("$(apache.service_name)","apache_kept","apache_repaired|php_repaired"),
|
||||||
depends_on => {"apache_vhost_dir_created","apache_www_dir_created","apache_main_cfg_crreated"},
|
depends_on => {
|
||||||
service_policy => "start",
|
"apache_pkgs_installed",
|
||||||
handle => "apache_running";
|
"apache_php_pkgs_installed",
|
||||||
|
"apache_www_dir_created",
|
||||||
|
"apache_vhost_dir_created",
|
||||||
|
"apache_main_cfg_created"
|
||||||
|
};
|
||||||
|
|
||||||
|
#depends_on => {
|
||||||
|
# "apache_php_pkgs_installed"
|
||||||
|
|
||||||
"php_changed|apache_changed"::
|
#};
|
||||||
"$(apache.service_name)"
|
|
||||||
depends_on => {"apache_vhost_dir_created","apache_www_dir_created","apache_main_cfg_crreated"},
|
|
||||||
service_policy => "restart";
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue