diff --git a/modules/utilities/unix/puppet_module/wordpress/templates/wordpress_conf.sh.erb b/modules/utilities/unix/puppet_module/wordpress/templates/wordpress_conf.sh.erb index 295d42da1..4427233d8 100644 --- a/modules/utilities/unix/puppet_module/wordpress/templates/wordpress_conf.sh.erb +++ b/modules/utilities/unix/puppet_module/wordpress/templates/wordpress_conf.sh.erb @@ -20,6 +20,10 @@ $params += '&language=' end -%> -curl -L <%= @https ? '-k ': '' %><%= $url_base %> -sleep 10 -curl -L --data '<%= $params %>' <%= @https ? '-k ': '' %><%= $url_base %>/wp-admin/install.php?step=2 \ No newline at end of file +if [ ! -f /wps ]; then + curl -L <%= @https ? '-k ': '' %><%= $url_base %> + sleep 10 + curl -L --data '<%= $params %>' <%= @https ? '-k ': '' %><%= $url_base %>/wp-admin/install.php?step=2 + sleep 10 + touch /wps +fi \ No newline at end of file diff --git a/modules/vulnerabilities/unix/webapp/wordpress_4x/manifests/init.pp b/modules/vulnerabilities/unix/webapp/wordpress_4x/manifests/init.pp index 630d56ff7..286523ce8 100644 --- a/modules/vulnerabilities/unix/webapp/wordpress_4x/manifests/init.pp +++ b/modules/vulnerabilities/unix/webapp/wordpress_4x/manifests/init.pp @@ -40,9 +40,14 @@ class wordpress_4x { owner => 'root', group => 'root', ensure => present, - mode => '0755', + mode => '0700', content => template('wordpress/wordpress_conf.sh.erb'), } + ~> + cron { 'run wordpress config script': + command => '/bin/bash /wordpress_conf.sh', + minute => [0, 5,10,15,20,25,30,35,40,45,50,55] + } # ~> # exec { 'run wordpress config script': # command => '/bin/bash /tmp/wordpress_conf.sh',