From 675996ccf2efbd504b1cb61a1e93e88622e20abe Mon Sep 17 00:00:00 2001 From: Bryan Roe Date: Thu, 30 Jun 2022 15:09:06 -0700 Subject: [PATCH 1/9] Filtered out exception that can get thrown when JS attempts to restart self, which is normal, because the exception says the process is shutting down. Only happens on macOS --- agents/recoverycore.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/agents/recoverycore.js b/agents/recoverycore.js index 0f4341fb..169b170c 100644 --- a/agents/recoverycore.js +++ b/agents/recoverycore.js @@ -721,8 +721,11 @@ function agentUpdate_Start(updateurl, updateoptions) { } catch (zz) { - sendConsoleText('Self Update encountered an error trying to restart service', sessionid); - sendAgentMessage('Self Update encountered an error trying to restart service', 3); + if (zz.toString() != 'waitExit() aborted because thread is exiting') + { + sendConsoleText('Self Update encountered an error trying to restart service', sessionid); + sendAgentMessage('Self Update encountered an error trying to restart service', 3); + } } break; } From 70e158afbdc85614293599c95de864949fca390f Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Thu, 30 Jun 2022 19:55:24 -0700 Subject: [PATCH 2/9] You can now change HTTP and HTTPS ports, #4172 --- meshuser.js | 16 +++++++++++++++ views/default.handlebars | 44 ++++++++++++++++++++++++++++++++++++---- 2 files changed, 56 insertions(+), 4 deletions(-) diff --git a/meshuser.js b/meshuser.js index 12560ab4..aa2fe965 100644 --- a/meshuser.js +++ b/meshuser.js @@ -3026,6 +3026,22 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use } } + if ((typeof command.httpport == 'number') && (command.httpport > 0) && (command.httpport < 65536)) { + if ((command.httpport == 80) && (node.httpport != null)) { + delete node.httpport; change = 1; changes.push('httpport'); // Delete the HTTP port + } else { + node.httpport = command.httpport; change = 1; changes.push('httpport'); // Set the HTTP port + } + } + + if ((typeof command.httpsport == 'number') && (command.httpsport > 0) && (command.httpsport < 65536)) { + if ((command.httpsport == 443) && (node.httpsport != null)) { + delete node.httpsport; change = 1; changes.push('httpsport'); // Delete the HTTPS port + } else { + node.httpsport = command.httpsport; change = 1; changes.push('httpsport'); // Set the HTTPS port + } + } + if ((typeof command.ssh == 'number') && (command.ssh == 0)) { if ((node.ssh != null) && (node.ssh[user._id] != null)) { delete node.ssh[user._id]; change = 1; changes.push('ssh'); } // Delete the SSH cendentials } diff --git a/views/default.handlebars b/views/default.handlebars index 07876c20..3a206ab3 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -112,6 +112,12 @@ + +