mirror of
https://github.com/octoleo/lsyncd.git
synced 2024-12-04 19:03:17 +00:00
fixed lbash example, default delay is 5 seconds
This commit is contained in:
parent
a54bca7fa8
commit
82f80b5d7d
@ -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/"}
|
||||
|
@ -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.
|
||||
--
|
||||
|
Loading…
Reference in New Issue
Block a user