gluon-autoupdater: add the posibility to delay the autoupdate on a node
This commit is contained in:
parent
d147c987c6
commit
1032bbdf9c
@ -47,6 +47,7 @@ autoupdater_util.randomseed()
|
|||||||
local minute = math.random(0, 59)
|
local minute = math.random(0, 59)
|
||||||
|
|
||||||
local f = io.open('/usr/lib/micron.d/autoupdater', 'w')
|
local f = io.open('/usr/lib/micron.d/autoupdater', 'w')
|
||||||
f:write(string.format('%i 4 * * * /usr/sbin/autoupdater\n', minute))
|
f:write(string.format('%i 4 * * * [ "$(uci -q get autoupdater.settings.delay)" == "1" ] && /usr/sbin/autoupdater --fallback || /usr/sbin/autoupdater\n', minute))
|
||||||
f:write(string.format('%i 0-3,5-23 * * * /usr/sbin/autoupdater --fallback\n', minute))
|
f:write(string.format('%i 5 * * * [ "$(uci -q get autoupdater.settings.delay)" == "1" ] && /usr/sbin/autoupdater || /usr/sbin/autoupdater --fallback\n', minute))
|
||||||
|
f:write(string.format('%i 0-3,6-23 * * * /usr/sbin/autoupdater --fallback\n', minute))
|
||||||
f:close()
|
f:close()
|
||||||
|
Loading…
Reference in New Issue
Block a user