mirror of https://github.com/octoleo/lsyncd.git
allowing command line delay override the config file again
This commit is contained in:
parent
998f9ab3d0
commit
23dbbe5ecd
24
lsyncd.lua
24
lsyncd.lua
|
@ -65,6 +65,12 @@ local Monitors
|
|||
--
|
||||
local processCount = 0
|
||||
|
||||
--
|
||||
-- Settings specified by command line.
|
||||
--
|
||||
local clSettings = { }
|
||||
|
||||
|
||||
--============================================================================
|
||||
-- Lsyncd Prototypes
|
||||
--============================================================================
|
||||
|
@ -2270,7 +2276,8 @@ local Syncs = ( function( )
|
|||
'maxDelays',
|
||||
'maxProcesses'
|
||||
}
|
||||
-- Lets settings or commandline override these values.
|
||||
|
||||
-- Lets settings override these values.
|
||||
if settings then
|
||||
for _, v in ipairs( inheritSettings ) do
|
||||
if settings[ v ] then
|
||||
|
@ -2279,6 +2286,15 @@ local Syncs = ( function( )
|
|||
end
|
||||
end
|
||||
|
||||
-- Lets commandline override these values.
|
||||
if clSettings then
|
||||
for _, v in ipairs( inheritSettings ) do
|
||||
if clSettings[ v ] then
|
||||
config[ v ] = clSettings[ v ]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--
|
||||
-- lets the userscript 'prepare' function
|
||||
-- check and complete the config
|
||||
|
@ -3520,11 +3536,6 @@ SEE:
|
|||
end
|
||||
|
||||
|
||||
--
|
||||
-- Settings specified by command line.
|
||||
--
|
||||
local clSettings = { }
|
||||
|
||||
--
|
||||
-- Called from core to parse the command line arguments
|
||||
--
|
||||
|
@ -3790,7 +3801,6 @@ function runner.initialize( firstTime )
|
|||
if k ~= 'syncs' then
|
||||
settings[ k ] = v
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
--
|
||||
|
|
Loading…
Reference in New Issue