fixed lbash example, default delay is 5 seconds

This commit is contained in:
Axel Kittenberger 2010-11-26 12:52:05 +00:00
parent a54bca7fa8
commit 82f80b5d7d
2 changed files with 13 additions and 6 deletions

View File

@ -21,19 +21,21 @@ prefix = ""
-- for testing purposes. uses bash command to hold local dirs in sync.
--
bash = {
delay = 0,
maxProcesses = 3,
maxProcesses = 1,
-- calls `cp -r SOURCE/* TARGET` only when there is something in SOURCE
onStartup =
[[if [ "$(ls -A ^source)" ]; then cp -r ^source* ^target; fi]],
onCreate = prefix..[[cp -r ^sourcePathname ^targetPathname]],
onCreate = prefix..[[cp -r ^sourcePath ^targetPath]],
onModify = prefix..[[cp -r ^sourcePathname ^targetPathname]],
onModify = prefix..[[cp -r ^sourcePath ^targetPath]],
onDelete = prefix..[[rm -rf ^targetPathname]],
onDelete = prefix..[[rm -rf ^targetPath]],
onMove = prefix..[[mv ^o.targetPathname ^d.targetPathname]],
onMove = prefix..[[mv ^o.targetPath ^d.targetPath]],
}
sync{bash, source="src", target="/path/to/trg/"}

View File

@ -1403,7 +1403,7 @@ local Syncs = (function()
-- loads a default value for an option if not existent
local defaultValues = {
'action',
'action',
'collapse',
'collapseTable',
'collect',
@ -2927,6 +2927,11 @@ default = {
return rc
end,
-----
-- default Delay
--
delay = 5,
-----
-- called on (re)initalizing of Lsyncd.
--