From 16f85a23d29b74aa29d3e52ea819ddbc4405da7a Mon Sep 17 00:00:00 2001 From: Johannes Zellner Date: Fri, 6 Mar 2020 00:39:37 -0800 Subject: [PATCH] Clear reboot notification if reboot is triggered --- src/cloudron.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/cloudron.js b/src/cloudron.js index 489c07a80..96e88320c 100644 --- a/src/cloudron.js +++ b/src/cloudron.js @@ -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) {