|
@@ -47,7 +47,11 @@ local autoupdater_util = require 'autoupdater.util'
|
|
|
autoupdater_util.randomseed()
|
|
|
|
|
|
|
|
|
--- Perform updates at a random time between 04:00 and 05:00
|
|
|
+-- Perform updates at a random time between 04:00 and 05:00, and once an hour
|
|
|
+-- a fallback update (used after the regular updates haven't
|
|
|
+local minute = math.random(0, 59)
|
|
|
+
|
|
|
local f = io.open('/lib/gluon/cron/autoupdater', 'w')
|
|
|
-f:write(string.format('%i 4 * * * /lib/gluon/autoupdater/autoupdate\n', math.random(0, 59)))
|
|
|
+f:write(string.format('%i 4 * * * /usr/sbin/autoupdater\n', minute))
|
|
|
+f:write(string.format('%i 0-3,5-23 * * * /usr/sbin/autoupdater --fallback\n', minute))
|
|
|
f:close()
|