<commit_before>rightscale_marker :begin

template "/home/webapps/#{node[:coldfusion][:application]}/www/CFIDE/cfadmin.cfm" do
  source "cfadmin.cfm.erb"
  mode 00644
  variables(
    :cf_admin_pass => node[:coldfusion][:admin_password],
    :hostname => node[:coldfusion][:db][:hostname],
    :db_user => node[:coldfusion][:db][:username],
    :db_pass => node[:coldfusion][:db][:password],
    :master_schema => node[:coldfusion][:db][:master_schema],
    :multi_schema => node[:coldfusion][:db][:multi_schema],
    :stats_schema => node[:coldfusion][:db][:stats_schema],
    :webroot => "/home/webapps/#{node[:coldfusion][:application]}",
    :username => node[:coldfusion][:tasks][:username],
    :password => node[:coldfusion][:tasks][:password],
    :mailserver => node[:coldfusion][:mail][:server]
  )
end


ruby_block "permissions" do
  block do
    system "chmod -R 777 /home/webapps/#{node[:coldfusion][:application]}/temp/"
    system "mkdir /home/webapps/#{node[:coldfusion][:application]}/includes/localhost"
    system "mkdir /opt/jrun4/Mail/Fail"
    system "chmod 755 /opt/jrun4/Mail/Fail"
    system "chown nobody.nogroup /opt/jrun4/Mail/Fail"
  end
end

ruby_block "run admin api" do
  block do
    system "while [ `/opt/jrun4/bin/cfstat | grep "Could not" | wc -l`  -gt 0 ]
do
        echo -n '.';
        sleep 1;
done
sleep 5;"
    system "curl localhost:8000/CFIDE/cfadmin.cfm"
  end
end

rightscale_marker :end<commit_msg>fixed syntax error, bad quotes<commit_after>rightscale_marker :begin

template "/home/webapps/#{node[:coldfusion][:application]}/www/CFIDE/cfadmin.cfm" do
  source "cfadmin.cfm.erb"
  mode 00644
  variables(
    :cf_admin_pass => node[:coldfusion][:admin_password],
    :hostname => node[:coldfusion][:db][:hostname],
    :db_user => node[:coldfusion][:db][:username],
    :db_pass => node[:coldfusion][:db][:password],
    :master_schema => node[:coldfusion][:db][:master_schema],
    :multi_schema => node[:coldfusion][:db][:multi_schema],
    :stats_schema => node[:coldfusion][:db][:stats_schema],
    :webroot => "/home/webapps/#{node[:coldfusion][:application]}",
    :username => node[:coldfusion][:tasks][:username],
    :password => node[:coldfusion][:tasks][:password],
    :mailserver => node[:coldfusion][:mail][:server]
  )
end


ruby_block "permissions" do
  block do
    system "chmod -R 777 /home/webapps/#{node[:coldfusion][:application]}/temp/"
    system "mkdir /home/webapps/#{node[:coldfusion][:application]}/includes/localhost"
    system "mkdir /opt/jrun4/Mail/Fail"
    system "chmod 755 /opt/jrun4/Mail/Fail"
    system "chown nobody.nogroup /opt/jrun4/Mail/Fail"
  end
end

ruby_block "run admin api" do
  block do
    system "while [ `/opt/jrun4/bin/cfstat | grep \"Could not\" | wc -l`  -gt 0 ]
do
        echo -n '.';
        sleep 1;
done
sleep 5;"
    system "curl localhost:8000/CFIDE/cfadmin.cfm"
  end
end

rightscale_marker :end
{'fraction_non_alphanumeric': 0.1785345717234262, 'fraction_numerical': 0.015135878912968696, 'mean_word_length': 4.435514018691589, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2753568', 'n_tokens_mistral': 1112, 'n_tokens_neox': 1017, 'n_words': 185}