mirror of
https://github.com/octoleo/lsyncd.git
synced 2024-10-31 18:52:29 +00:00
trying to fix, not working yet
This commit is contained in:
parent
cbfed8ee99
commit
9096fc9686
@ -20,11 +20,13 @@ dist_example_DATA = \
|
||||
examples/lecho.lua \
|
||||
examples/lgforce.lua \
|
||||
examples/limagemagic.lua \
|
||||
examples/lpostcmd.lua \
|
||||
examples/lrsync.lua \
|
||||
examples/lrsyncssh.lua
|
||||
TESTS = \
|
||||
tests/churn-rsync.lua \
|
||||
tests/churn-rsyncssh.lua \
|
||||
tests/churn-direct.lua \
|
||||
tests/exclude-rsync.lua \
|
||||
tests/exclude-rsyncssh.lua \
|
||||
tests/l4rsyncdata.lua
|
||||
|
15
lsyncd.lua
15
lsyncd.lua
@ -3431,8 +3431,14 @@ local default_direct = {
|
||||
-- gets all events ready for syncing
|
||||
local event, event2 = inlet.getEvent()
|
||||
|
||||
if event.etype == "Create" or event.etpye == "Modifiy" then
|
||||
spawn(event, "/bin/cp", "-r", event.sourcePath, event.targetPathdir)
|
||||
if event.etype == "Create" or event.etype == "Modifiy" then
|
||||
spawn(event,
|
||||
"/bin/cp",
|
||||
"-p",
|
||||
event.sourcePath,
|
||||
"-t",
|
||||
event.targetPathdir
|
||||
)
|
||||
elseif event.etype == "Delete" then
|
||||
local tp = event.targetPath
|
||||
-- extra security check
|
||||
@ -3493,6 +3499,11 @@ local default_direct = {
|
||||
-- Default delay is very short.
|
||||
--
|
||||
delay = 1,
|
||||
|
||||
-----
|
||||
-- For startup sync
|
||||
--
|
||||
rsyncOps = "-lts",
|
||||
|
||||
-----
|
||||
-- On many system multiple disk operations just rather slow down
|
||||
|
@ -15,7 +15,7 @@ churn(srcdir, 10)
|
||||
|
||||
local logs = {}
|
||||
--logs = {"-log", "Delay", "-log", "Fsevents" }
|
||||
local pid = spawn("./lsyncd", "-nodaemon", "-delay", "5",
|
||||
local pid = spawn("./lsyncd", "-nodaemon",
|
||||
"-direct", srcdir, trgdir, unpack(logs))
|
||||
|
||||
cwriteln("waiting for Lsyncd to startup")
|
||||
|
Loading…
Reference in New Issue
Block a user