diff --git a/src/apps.js b/src/apps.js index 946adafe4..1ade74f72 100644 --- a/src/apps.js +++ b/src/apps.js @@ -829,7 +829,7 @@ function autoupdateApps(updateInfo, callback) { // updateInfo is { appId -> { ma } update(appId, false /* force */, updateInfo[appId].manifest, app.portBindings, - null /* icon */, { userId: null, username: 'autoupdater' }, function (error) { + null /* icon */, { userId: null, username: 'cron' }, function (error) { if (error) debug('Error initiating autoupdate of %s. %s', appId, error.message); iteratorDone(null); diff --git a/src/cron.js b/src/cron.js index 3872b8590..28192794b 100644 --- a/src/cron.js +++ b/src/cron.js @@ -30,6 +30,7 @@ var gAutoupdaterJob = null, gCheckDiskSpaceJob = null; var NOOP_CALLBACK = function (error) { if (error) console.error(error); }; +var AUDIT_SOURCE = { userId: null, username: 'cron' }; // cron format // Seconds: 0-59 @@ -154,7 +155,7 @@ function autoupdatePatternChanged(pattern) { var updateInfo = updateChecker.getUpdateInfo(); if (updateInfo.box) { debug('Starting autoupdate to %j', updateInfo.box); - cloudron.update(updateInfo.box, NOOP_CALLBACK); + cloudron.updateToLatest(AUDIT_SOURCE, NOOP_CALLBACK); } else if (updateInfo.apps) { debug('Starting app update to %j', updateInfo.apps); apps.autoupdateApps(updateInfo.apps, NOOP_CALLBACK);