<commit_before>user node[:p4d][:owner] do
  system true
  action :create
end

group node[:p4d][:group] do
  action :create
end

directory node[:p4d][:install_dir] do
  recursive true
  owner node[:p4d][:owner]
  group node[:p4d][:group]
end

directory node[:p4d][:root_dir] do
  owner node[:p4d][:owner]
  group node[:p4d][:group]
  recursive true
end

directory node[:p4d][:journal_dir] do
  owner node[:p4d][:owner]
  group node[:p4d][:group]
  recursive true
  action :create
end

directory node[:p4d][:log_dir] do
  owner node[:p4d][:owner]
  group node[:p4d][:group]
  recursive true
  action :create
end

directory node[:p4d][:audit_dir] do
  owner node[:p4d][:owner]
  group node[:p4d][:group]
  recursive true
  action :create
end

perforce_p4d node[:p4d][:version] do
  directory node[:p4d][:install_dir]
  sixty_four node[:kernel][:machine] == "x86_64"
end

template "/etc/init.d/p4d" do
  mode 0755
  source "p4d.erb"
end

service "p4d" do
  supports :status => true, :restart => true
  action [ :enable, :start ]
end

execute "start-p4d" do
  command "service p4d start"
end<commit_msg>Improved security of directories.<commit_after>user node[:p4d][:owner] do
  system true
  action :create
end

group node[:p4d][:group] do
  action :create
end

directory node[:p4d][:install_dir] do
  recursive true
  owner node[:p4d][:owner]
  group node[:p4d][:group]
  mode 0700
end

directory node[:p4d][:root_dir] do
  owner node[:p4d][:owner]
  group node[:p4d][:group]
  mode 0700
  recursive true
end

directory node[:p4d][:journal_dir] do
  owner node[:p4d][:owner]
  group node[:p4d][:group]
  mode 0700
  recursive true
  action :create
end

directory node[:p4d][:log_dir] do
  owner node[:p4d][:owner]
  group node[:p4d][:group]
  mode 0700
  recursive true
  action :create
end

directory node[:p4d][:audit_dir] do
  owner node[:p4d][:owner]
  group node[:p4d][:group]
  mode 0700
  recursive true
  action :create
end

perforce_p4d node[:p4d][:version] do
  directory node[:p4d][:install_dir]
  sixty_four node[:kernel][:machine] == "x86_64"
end

template "/etc/init.d/p4d" do
  mode 0755
  source "p4d.erb"
end

service "p4d" do
  supports :status => true, :restart => true
  action [ :enable, :start ]
end

execute "start-p4d" do
  command "service p4d start"
end
{'fraction_non_alphanumeric': 0.14103690685413006, 'fraction_numerical': 0.037785588752196834, 'mean_word_length': 4.823529411764706, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '3460917', 'n_tokens_mistral': 935, 'n_tokens_neox': 911, 'n_words': 226}