mirror of https://github.com/octoleo/lsyncd.git
adding append/append_verify
This commit is contained in:
parent
2ff9ae72be
commit
db488a86ac
|
@ -1,5 +1,7 @@
|
|||
??-??-????:
|
||||
enhancement: add rsync options:
|
||||
"append",
|
||||
"append-verify",
|
||||
"chmod",
|
||||
"chown",
|
||||
"copy_dirlinks",
|
||||
|
|
|
@ -53,6 +53,8 @@ rsync.checkgauge = {
|
|||
|
||||
rsync = {
|
||||
acls = true,
|
||||
append = true,
|
||||
append_verify = true,
|
||||
archive = true,
|
||||
binary = true,
|
||||
bwlimit = true,
|
||||
|
@ -239,20 +241,24 @@ rsync.init = function(event)
|
|||
local delete = nil
|
||||
local target = config.target
|
||||
|
||||
if not target then
|
||||
if not config.host then
|
||||
if not target
|
||||
then
|
||||
if not config.host
|
||||
then
|
||||
error('Internal fail, Neither target nor host is configured')
|
||||
end
|
||||
|
||||
target = config.host .. ':' .. config.targetdir
|
||||
end
|
||||
|
||||
if config.delete == true or config.delete == 'startup' then
|
||||
if config.delete == true or config.delete == 'startup'
|
||||
then
|
||||
delete = { '--delete', '--ignore-errors' }
|
||||
end
|
||||
|
||||
if #excludes == 0 then
|
||||
-- start rsync without any excludes
|
||||
if #excludes == 0
|
||||
then
|
||||
-- starts rsync without any excludes
|
||||
log(
|
||||
'Normal',
|
||||
'recursive startup rsync: ',
|
||||
|
@ -272,7 +278,7 @@ rsync.init = function(event)
|
|||
)
|
||||
|
||||
else
|
||||
-- start rsync providing an exclude list
|
||||
-- starts rsync providing an exclusion list
|
||||
-- on stdin
|
||||
local exS = table.concat( excludes, '\n' )
|
||||
|
||||
|
@ -488,6 +494,18 @@ rsync.prepare =
|
|||
end
|
||||
end
|
||||
|
||||
if crsync.append
|
||||
then
|
||||
computed[ computedN ] = '--append'
|
||||
computedN = computedN + 1
|
||||
end
|
||||
|
||||
if crsync.append_verify
|
||||
then
|
||||
computed[ computedN ] = '--append-verify'
|
||||
computedN = computedN + 1
|
||||
end
|
||||
|
||||
if crsync.bwlimit
|
||||
then
|
||||
computed[ computedN ] = '--bwlimit=' .. crsync.bwlimit
|
||||
|
|
Loading…
Reference in New Issue