notifications: clearAlert
This commit is contained in:
@@ -168,7 +168,7 @@ async function getConfig() {
|
||||
}
|
||||
|
||||
async function reboot() {
|
||||
await notifications.alert(notifications.ALERT_REBOOT, 'Reboot Required', '');
|
||||
await notifications.clearAlert(notifications.ALERT_REBOOT, 'Reboot Required');
|
||||
|
||||
const [error] = await safe(shell.promises.sudo('reboot', [ REBOOT_CMD ], {}));
|
||||
if (error) debug('reboot: could not reboot', error);
|
||||
@@ -198,7 +198,11 @@ async function checkMailStatus() {
|
||||
|
||||
async function checkRebootRequired() {
|
||||
const rebootRequired = await isRebootRequired();
|
||||
await notifications.alert(notifications.ALERT_REBOOT, 'Reboot Required', rebootRequired ? 'To finish ubuntu security updates, a reboot is necessary.' : '');
|
||||
if (rebootRequired) {
|
||||
await notifications.alert(notifications.ALERT_REBOOT, 'Reboot Required', 'To finish ubuntu security updates, a reboot is necessary.');
|
||||
} else {
|
||||
await notifications.clearAlert(notifications.ALERT_REBOOT, 'Reboot Required');
|
||||
}
|
||||
}
|
||||
|
||||
async function checkUbuntuVersion() {
|
||||
|
||||
Reference in New Issue
Block a user