mirror of
https://github.com/octoleo/lsyncd.git
synced 2025-01-08 09:18:30 +00:00
fixing settings.insist ignore by default
This commit is contained in:
parent
6d4149acdc
commit
b6fa608787
47
default.lua
47
default.lua
@ -52,21 +52,53 @@ default = {
|
|||||||
log('Normal', 'Startup of "',agent.source,'" finished.')
|
log('Normal', 'Startup of "',agent.source,'" finished.')
|
||||||
return 'ok'
|
return 'ok'
|
||||||
elseif rc == 'again' then
|
elseif rc == 'again' then
|
||||||
log('Normal', 'Retrying startup of "',agent.source,'".')
|
if settings.insist then
|
||||||
return "again"
|
log(
|
||||||
|
'Normal',
|
||||||
|
'Retrying startup of "',
|
||||||
|
agent.source,
|
||||||
|
'": ',
|
||||||
|
exitcode
|
||||||
|
)
|
||||||
|
|
||||||
|
return 'again'
|
||||||
|
else
|
||||||
|
log(
|
||||||
|
'Error',
|
||||||
|
'Temporary or permanent failure on startup of "',
|
||||||
|
agent.source,
|
||||||
|
'". Terminating since "insist" is not set.'
|
||||||
|
)
|
||||||
|
terminate(-1) -- ERRNO
|
||||||
|
end
|
||||||
elseif rc == 'die' then
|
elseif rc == 'die' then
|
||||||
log('Error', 'Failure on startup of "',agent.source,'".')
|
log(
|
||||||
|
'Error',
|
||||||
|
'Failure on startup of "',
|
||||||
|
agent.source,
|
||||||
|
'".'
|
||||||
|
)
|
||||||
terminate(-1) -- ERRNO
|
terminate(-1) -- ERRNO
|
||||||
else
|
else
|
||||||
log('Error', 'Unknown exitcode "',exitcode,'" on startup of "',agent.source,'".')
|
log(
|
||||||
|
'Error',
|
||||||
|
'Unknown exitcode "',
|
||||||
|
exitcode,
|
||||||
|
'" on startup of "',
|
||||||
|
agent.source,
|
||||||
|
'".'
|
||||||
|
)
|
||||||
return 'die'
|
return 'die'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if agent.isList then
|
if agent.isList then
|
||||||
if rc == 'ok' then log('Normal', 'Finished a list = ',exitcode)
|
if rc == 'ok' then
|
||||||
elseif rc == 'again' then log('Normal', 'Retrying a list on exitcode = ',exitcode)
|
log('Normal', 'Finished a list = ',exitcode)
|
||||||
elseif rc == 'die' then log('Error', 'Failure with a list on exitcode = ',exitcode)
|
elseif rc == 'again' then
|
||||||
|
log('Normal', 'Retrying a list on exitcode = ',exitcode)
|
||||||
|
elseif rc == 'die' then
|
||||||
|
log('Error', 'Failure with a list on exitcode = ',exitcode)
|
||||||
else
|
else
|
||||||
log('Error', 'Unknown exitcode "',exitcode,'" with a list')
|
log('Error', 'Unknown exitcode "',exitcode,'" with a list')
|
||||||
rc = 'die'
|
rc = 'die'
|
||||||
@ -84,6 +116,7 @@ default = {
|
|||||||
rc = 'die'
|
rc = 'die'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return rc
|
return rc
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user