mirror of
https://github.com/octoleo/lsyncd.git
synced 2024-05-31 23:40:51 +00:00
allow to configure xargs
This commit is contained in:
parent
2cc23bb5b1
commit
d79ce6da50
12
lsyncd.lua
12
lsyncd.lua
|
@ -3223,12 +3223,12 @@ local default_rsyncssh = {
|
||||||
end
|
end
|
||||||
|
|
||||||
local sPaths = table.concat(paths, "\n")
|
local sPaths = table.concat(paths, "\n")
|
||||||
local zPaths = table.concat(paths, "\000")
|
local zPaths = table.concat(paths, config.xargs.delimiter)
|
||||||
log("Normal", "Deleting list\n", sPaths)
|
log("Normal", "Deleting list\n", sPaths)
|
||||||
spawn(elist, "/usr/bin/ssh",
|
spawn(elist, "/usr/bin/ssh",
|
||||||
"<", zPaths,
|
"<", zPaths,
|
||||||
config.host,
|
config.host,
|
||||||
"xargs", "-0", "rm -rf")
|
config.xargs.binary, config.xargs.xparams)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -3355,6 +3355,14 @@ local default_rsyncssh = {
|
||||||
-- Default delay.
|
-- Default delay.
|
||||||
--
|
--
|
||||||
delay = 15,
|
delay = 15,
|
||||||
|
|
||||||
|
-----
|
||||||
|
-- Delimiter, the binary and the paramters passed to xargs
|
||||||
|
-- xargs is used to delete multiple remote files, when ssh access is
|
||||||
|
-- available this is simpler than to build filters for rsync for this.
|
||||||
|
-- Default uses '0' as limiter, you might override this for old systems.
|
||||||
|
--
|
||||||
|
xargs = {delimiter = '\000', binary = "xargs", xparams = {"-0", "rm -rf"}}
|
||||||
}
|
}
|
||||||
|
|
||||||
-----
|
-----
|
||||||
|
|
Loading…
Reference in New Issue
Block a user