lsyncd/lsyncd-conf.lua

23 lines
478 B
Lua
Raw Normal View History

2010-10-19 10:20:27 +00:00
----
-- User configuration file for lsyncd.
--
-- TODO documentation-
--
2010-10-16 18:21:01 +00:00
settings = {
2010-10-18 17:09:59 +00:00
logfile = "/tmp/lsyncd",
2010-10-17 15:24:55 +00:00
nodaemon,
2010-10-16 18:21:01 +00:00
}
2010-10-21 12:37:27 +00:00
directory("s", "d")
2010-10-17 15:24:55 +00:00
-- add("s/s1", "t")
2010-10-16 18:21:01 +00:00
2010-10-19 20:21:38 +00:00
----
-- Called for every source .. target pair on startup
-- Returns the pid of a spawned process
-- Return 0 if you dont exec something.
function startup_action(source, target)
2010-10-20 18:33:17 +00:00
log(NORMAL, "startup recursive rsync: " .. source .. " -> " .. target)
2010-10-19 20:21:38 +00:00
return exec("/usr/bin/rsync", "-ltrs", source, target)
end
2010-10-17 17:13:53 +00:00