lsyncd/lsyncd-conf.lua

28 lines
624 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-22 08:34:41 +00:00
rsync = {
default = function(source, path, target)
return exec("/usr/bin/rsync", "--delete", "-ltds", source .. "/" .. path, target .. "/" .. path)
end
}
directory("s", "d", rsync)
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