Skip to content

Instantly share code, notes, and snippets.

@perusio
Created February 11, 2012 01:17
Show Gist options
  • Save perusio/1794903 to your computer and use it in GitHub Desktop.
Save perusio/1794903 to your computer and use it in GitHub Desktop.
Echo example for lsyncd
settings = {
logfile = '/tmp/lsyncd.log',
statusFile = '/tmp/lsyncd.stat',
statusInterval = 1,
nodaemon = true
}
echo = {
maxProcesses = 1,
delay = 1,
onStartup = "/bin/echo telling about ^source",
onAttrib = "/bin/echo attrib ^pathname",
onCreate = "/bin/echo create ^pathname",
onDelete = "/bin/echo delete ^pathname",
onModify = "/bin/echo modify ^pathname",
onMove = "/bin/echo move ^o.pathname -> ^d.pathname",
}
-- Note that exclude is a list, i.e., a table with integer indexes.
sync{echo, source="/path/to/src", target="/path/to/target", exclude={".git*"}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment