Make reboot required check server side

This commit is contained in:
Girish Ramakrishnan
2019-02-19 09:19:56 -08:00
parent 5ae93bb569
commit 7a0d4ad508
3 changed files with 31 additions and 2 deletions

View File

@@ -191,7 +191,8 @@ function runSystemChecks() {
async.parallel([
checkBackupConfiguration,
checkDiskSpace,
checkMailStatus
checkMailStatus,
checkRebootRequired
], function () {
debug('runSystemChecks: done');
});
@@ -284,6 +285,20 @@ function checkMailStatus(callback) {
});
}
function checkRebootRequired(callback) {
assert.strictEqual(typeof callback, 'function');
debug('checking if reboot required');
isRebootRequired(function (error, rebootRequired) {
if (error) return callback(error);
if (rebootRequired) notifications.rebootRequired('To finish security updates, a [reboot](/#/system) is necessary.');
callback();
});
}
function getLogs(unit, options, callback) {
assert.strictEqual(typeof unit, 'string');
assert(options && typeof options === 'object');