1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-29 14:43:38 +00:00

Updated self update to display update message in console mode on linux

This commit is contained in:
Bryan Roe
2020-11-02 10:12:06 -08:00
parent 149038a657
commit 5417cf5f09
3 changed files with 16 additions and 13 deletions

View File

@@ -5651,6 +5651,7 @@ int MeshAgent_Start(MeshAgentHostContainer *agentHost, int paramLen, char **para
ILIBLOGMESSSAGE("SelfUpdate -> Service Check... [NO]");
ILIBLOGMESSSAGE("SelfUpdate -> Manual Mode (COMPLETE)");
}
ignore_result(write(STDOUT_FILENO, "SelfUpdate -> Updating Agent...\n", 32));
// Generic update process, call our own update with arguments.
struct stat results;
@@ -5660,6 +5661,7 @@ int MeshAgent_Start(MeshAgentHostContainer *agentHost, int paramLen, char **para
remove(agentHost->exePath);
sprintf_s(ILibScratchPad, sizeof(ILibScratchPad), "cp %s %s", updateFilePath, agentHost->exePath);
if (system(ILibScratchPad)) {}
ignore_result(write(STDOUT_FILENO, "SelfUpdate -> Restarting Agent...\n", 34));
execv(agentHost->exePath, agentHost->execparams);
_exit(1);