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/lecho.lua \
|
||||||
examples/lgforce.lua \
|
examples/lgforce.lua \
|
||||||
examples/limagemagic.lua \
|
examples/limagemagic.lua \
|
||||||
|
examples/lpostcmd.lua \
|
||||||
examples/lrsync.lua \
|
examples/lrsync.lua \
|
||||||
examples/lrsyncssh.lua
|
examples/lrsyncssh.lua
|
||||||
TESTS = \
|
TESTS = \
|
||||||
tests/churn-rsync.lua \
|
tests/churn-rsync.lua \
|
||||||
tests/churn-rsyncssh.lua \
|
tests/churn-rsyncssh.lua \
|
||||||
|
tests/churn-direct.lua \
|
||||||
tests/exclude-rsync.lua \
|
tests/exclude-rsync.lua \
|
||||||
tests/exclude-rsyncssh.lua \
|
tests/exclude-rsyncssh.lua \
|
||||||
tests/l4rsyncdata.lua
|
tests/l4rsyncdata.lua
|
||||||
|
15
lsyncd.lua
15
lsyncd.lua
@ -3431,8 +3431,14 @@ local default_direct = {
|
|||||||
-- gets all events ready for syncing
|
-- gets all events ready for syncing
|
||||||
local event, event2 = inlet.getEvent()
|
local event, event2 = inlet.getEvent()
|
||||||
|
|
||||||
if event.etype == "Create" or event.etpye == "Modifiy" then
|
if event.etype == "Create" or event.etype == "Modifiy" then
|
||||||
spawn(event, "/bin/cp", "-r", event.sourcePath, event.targetPathdir)
|
spawn(event,
|
||||||
|
"/bin/cp",
|
||||||
|
"-p",
|
||||||
|
event.sourcePath,
|
||||||
|
"-t",
|
||||||
|
event.targetPathdir
|
||||||
|
)
|
||||||
elseif event.etype == "Delete" then
|
elseif event.etype == "Delete" then
|
||||||
local tp = event.targetPath
|
local tp = event.targetPath
|
||||||
-- extra security check
|
-- extra security check
|
||||||
@ -3493,6 +3499,11 @@ local default_direct = {
|
|||||||
-- Default delay is very short.
|
-- Default delay is very short.
|
||||||
--
|
--
|
||||||
delay = 1,
|
delay = 1,
|
||||||
|
|
||||||
|
-----
|
||||||
|
-- For startup sync
|
||||||
|
--
|
||||||
|
rsyncOps = "-lts",
|
||||||
|
|
||||||
-----
|
-----
|
||||||
-- On many system multiple disk operations just rather slow down
|
-- On many system multiple disk operations just rather slow down
|
||||||
|
@ -15,7 +15,7 @@ churn(srcdir, 10)
|
|||||||
|
|
||||||
local logs = {}
|
local logs = {}
|
||||||
--logs = {"-log", "Delay", "-log", "Fsevents" }
|
--logs = {"-log", "Delay", "-log", "Fsevents" }
|
||||||
local pid = spawn("./lsyncd", "-nodaemon", "-delay", "5",
|
local pid = spawn("./lsyncd", "-nodaemon",
|
||||||
"-direct", srcdir, trgdir, unpack(logs))
|
"-direct", srcdir, trgdir, unpack(logs))
|
||||||
|
|
||||||
cwriteln("waiting for Lsyncd to startup")
|
cwriteln("waiting for Lsyncd to startup")
|
||||||
|
Loading…
Reference in New Issue
Block a user