mirror of
https://github.com/octoleo/lsyncd.git
synced 2024-05-28 22:20:47 +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.
|
-- for testing purposes. uses bash command to hold local dirs in sync.
|
||||||
--
|
--
|
||||||
bash = {
|
bash = {
|
||||||
|
delay = 0,
|
||||||
|
|
||||||
maxProcesses = 3,
|
maxProcesses = 1,
|
||||||
|
|
||||||
|
-- calls `cp -r SOURCE/* TARGET` only when there is something in SOURCE
|
||||||
onStartup =
|
onStartup =
|
||||||
[[if [ "$(ls -A ^source)" ]; then cp -r ^source* ^target; fi]],
|
[[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/"}
|
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
|
-- loads a default value for an option if not existent
|
||||||
local defaultValues = {
|
local defaultValues = {
|
||||||
'action',
|
'action',
|
||||||
'collapse',
|
'collapse',
|
||||||
'collapseTable',
|
'collapseTable',
|
||||||
'collect',
|
'collect',
|
||||||
|
@ -2927,6 +2927,11 @@ default = {
|
||||||
return rc
|
return rc
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
-----
|
||||||
|
-- default Delay
|
||||||
|
--
|
||||||
|
delay = 5,
|
||||||
|
|
||||||
-----
|
-----
|
||||||
-- called on (re)initalizing of Lsyncd.
|
-- called on (re)initalizing of Lsyncd.
|
||||||
--
|
--
|
||||||
|
|
Loading…
Reference in New Issue
Block a user