diff --git a/package/gluon-autoupdater/check_site.lua b/package/gluon-autoupdater/check_site.lua index 4d6302cd..1d8996f0 100644 --- a/package/gluon-autoupdater/check_site.lua +++ b/package/gluon-autoupdater/check_site.lua @@ -5,7 +5,6 @@ local function check_branch(k, _) need_string(prefix .. 'name') need_string_array(prefix .. 'mirrors') - need_number(prefix .. 'probability') need_number(prefix .. 'good_signatures') need_string_array(prefix .. 'pubkeys') end diff --git a/package/gluon-autoupdater/files/lib/gluon/cron/autoupdater b/package/gluon-autoupdater/files/lib/gluon/cron/autoupdater deleted file mode 100644 index 1beebca1..00000000 --- a/package/gluon-autoupdater/files/lib/gluon/cron/autoupdater +++ /dev/null @@ -1 +0,0 @@ -0 * * * * /usr/sbin/autoupdater diff --git a/package/gluon-autoupdater/files/lib/gluon/upgrade/autoupdater/invariant/010-autoupdater b/package/gluon-autoupdater/files/lib/gluon/upgrade/autoupdater/invariant/010-autoupdater index b205f411..5cd11c05 100755 --- a/package/gluon-autoupdater/files/lib/gluon/upgrade/autoupdater/invariant/010-autoupdater +++ b/package/gluon-autoupdater/files/lib/gluon/upgrade/autoupdater/invariant/010-autoupdater @@ -12,7 +12,6 @@ for name, config in pairs(site.autoupdater.branches) do { name = config.name, mirror = config.mirrors, - probability = config.probability, good_signatures = config.good_signatures, pubkey = config.pubkeys, } @@ -42,3 +41,13 @@ c:set('autoupdater', 'settings', 'version_file', '/lib/gluon/release') c:save('autoupdater') c:commit('autoupdater') + + +local autoupdater_util = require 'autoupdater.util' +autoupdater_util.randomseed() + + +-- Perform updates at a random time between 04:00 and 05:00 +local f = io.open('/lib/gluon/cron/autoupdater', 'w') +f:write(string.format('%i 4 * * * /usr/sbin/autoupdater\n', math.random(0, 59))) +f:close()