Skip to content

Instantly share code, notes, and snippets.

@lra
Created August 12, 2014 01:10
Show Gist options
  • Save lra/be09b658db613b93280e to your computer and use it in GitHub Desktop.
Save lra/be09b658db613b93280e to your computer and use it in GitHub Desktop.
body common control
{
bundlesequence => { "test_watching_folder" };
}
bundle agent test_watching_folder
{
files:
"/tmp/watched_folder"
changes => detect_all_change,
depth_search => recurse("inf"),
classes => if_repaired("file_change_detected");
reports:
file_change_detected::
"File change detected";
}
body classes if_repaired(x)
{
promise_repaired => { "$(x)" };
}
body changes detect_content
{
hash => "md5";
report_changes => "content";
update_hashes => "yes";
}
body changes detect_all_change
{
hash => "best";
report_changes => "all";
update_hashes => "yes";
}
body depth_search recurse(d)
{
depth => "$(d)";
xdev => "true";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment