<commit_before>#!/bin/sh
#

for host in <%= @ssh_hosts.join(' ') %>
do
  key=`mktemp`
  grep $host <%= node['ossec']['user']['dir'] %>/etc/client.keys > $key
  scp -i <%= node['ossec']['user']['dir'] %>/.ssh/id_rsa -B -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no $key ossecd@$host:<%= node['ossec']['user']['dir'] %>/etc/client.keys >/dev/null 2>/dev/null
  rm $key
done<commit_msg>Restart OSSEC service upon distribution of client keys<commit_after>#!/bin/sh
#

for host in <%= @ssh_hosts.join(' ') %>
do
  key=`mktemp`
  grep $host <%= node['ossec']['user']['dir'] %>/etc/client.keys > $key
  scp -i <%= node['ossec']['user']['dir'] %>/.ssh/id_rsa -B -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no $key ossecd@$host:<%= node['ossec']['user']['dir'] %>/etc/client.keys >/dev/null 2>/dev/null
  rm $key
  ssh -i <%= node['ossec']['user']['dir'] %>/.ssh/id_rsa -B -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no 'sudo service ossec restart'
  echo $host done
done
{'fraction_non_alphanumeric': 0.23852295409181637, 'fraction_numerical': 0.001996007984031936, 'mean_word_length': 4.8313953488372094, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 18, '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': '3212177', 'n_tokens_mistral': 425, 'n_tokens_neox': 380, 'n_words': 82}