Clear reboot notification if reboot is triggered

This commit is contained in:
Johannes Zellner
2020-03-06 00:39:37 -08:00
parent fcee8aa5f3
commit 16f85a23d2

View File

@@ -141,7 +141,11 @@ function getConfig(callback) {
}
function reboot(callback) {
shell.sudo('reboot', [ REBOOT_CMD ], {}, callback);
notifications.alert(notifications.ALERT_REBOOT, 'Reboot Required', '', function (error) {
if (error) console.error('Failed to clear reboot notification.', error);
shell.sudo('reboot', [ REBOOT_CMD ], {}, callback);
});
}
function isRebootRequired(callback) {