add alert for ubuntu 16
This commit is contained in:
@@ -167,6 +167,10 @@ function runStartupTasks() {
|
||||
function getConfig(callback) {
|
||||
assert.strictEqual(typeof callback, 'function');
|
||||
|
||||
const release = safe.fs.readFileSync('/etc/lsb-release', 'utf-8');
|
||||
if (release === null) return callback(new BoxError(BoxError.FS_ERROR, safe.error.message));
|
||||
const ubuntuVersion = release.match(/DISTRIB_DESCRIPTION="(.*)"/)[1];
|
||||
|
||||
settings.getAll(function (error, allSettings) {
|
||||
if (error) return callback(error);
|
||||
|
||||
@@ -178,6 +182,7 @@ function getConfig(callback) {
|
||||
adminFqdn: settings.dashboardFqdn(),
|
||||
mailFqdn: settings.mailFqdn(),
|
||||
version: constants.VERSION,
|
||||
ubuntuVersion,
|
||||
isDemo: settings.isDemo(),
|
||||
cloudronName: allSettings[settings.CLOUDRON_NAME_KEY],
|
||||
footer: branding.renderFooter(allSettings[settings.FOOTER_KEY] || constants.FOOTER),
|
||||
@@ -209,7 +214,8 @@ function runSystemChecks(callback) {
|
||||
|
||||
async.parallel([
|
||||
checkMailStatus,
|
||||
checkRebootRequired
|
||||
checkRebootRequired,
|
||||
checkUbuntuVersion
|
||||
], callback);
|
||||
}
|
||||
|
||||
@@ -237,6 +243,14 @@ function checkRebootRequired(callback) {
|
||||
});
|
||||
}
|
||||
|
||||
function checkUbuntuVersion(callback) {
|
||||
assert.strictEqual(typeof callback, 'function');
|
||||
|
||||
const isXenial = fs.readFileSync('/etc/lsb-release', 'utf-8').includes('16.04');
|
||||
|
||||
if (isXenial) notifications.alert(notifications.ALERT_UPDATE_UBUNTU, 'Ubuntu Upgrade Required', 'Ubuntu 16.04 has reached end of life and will not receive security and maintenance updates. Please follow https://docs.cloudron.io/guides/upgrade-ubuntu-18/ to upgrade to Ubuntu 18 at the earliest.', callback);
|
||||
}
|
||||
|
||||
function getLogs(unit, options, callback) {
|
||||
assert.strictEqual(typeof unit, 'string');
|
||||
assert(options && typeof options === 'object');
|
||||
|
||||
Reference in New Issue
Block a user