diff --git a/meshcore/agentcore.c b/meshcore/agentcore.c index 11dd84f..3cf4d53 100644 --- a/meshcore/agentcore.c +++ b/meshcore/agentcore.c @@ -4347,7 +4347,7 @@ int MeshAgent_AgentMode(MeshAgentHostContainer *agentHost, int paramLen, char ** agentHost->platformType = MeshAgent_Posix_PlatformTypes_UNKNOWN; agentHost->JSRunningAsService = 0; - if (duk_peval_string(tmpCtx, "(function foo() { var f = require('service-manager').manager.getServiceType(); switch(f){case 'windows': return(10); case 'launchd': return(3); case 'freebsd': return(5); case 'systemd': return(1); case 'init': return(2); case 'upstart': return(4); default: return(0);}})()") == 0) + if (duk_peval_string(tmpCtx, "(function foo() { var f = require('service-manager').manager.getServiceType(); switch(f){case 'procd': return(7); case 'windows': return(10); case 'launchd': return(3); case 'freebsd': return(5); case 'systemd': return(1); case 'init': return(2); case 'upstart': return(4); default: return(0);}})()") == 0) { agentHost->platformType = (MeshAgent_Posix_PlatformTypes)duk_get_int(tmpCtx, -1); } @@ -5429,6 +5429,10 @@ int MeshAgent_Start(MeshAgentHostContainer *agentHost, int paramLen, char **para if (agentHost->logUpdate != 0) { ILIBLOGMESSSAGE("SelfUpdate -> Complete... [SYSTEMD should auto-restart]"); } exit(1); break; + case MeshAgent_Posix_PlatformTypes_PROCD: + if (agentHost->logUpdate != 0) { ILIBLOGMESSSAGE("SelfUpdate -> Complete... [PROCD should auto-restart]"); } + exit(1); + break; case MeshAgent_Posix_PlatformTypes_INITD: if (agentHost->logUpdate != 0) { ILIBLOGMESSSAGE("SelfUpdate -> Complete... Calling Service restart (INITD)"); } sprintf_s(ILibScratchPad, sizeof(ILibScratchPad), "service meshagent restart"); // Restart the service diff --git a/meshcore/agentcore.h b/meshcore/agentcore.h index 868d1f5..5c4403d 100644 --- a/meshcore/agentcore.h +++ b/meshcore/agentcore.h @@ -55,7 +55,8 @@ typedef enum MeshAgent_Posix_PlatformTypes MeshAgent_Posix_PlatformTypes_INIT_UPSTART = 4, MeshAgent_Posix_PlatformTypes_LAUNCHD = 3, MeshAgent_Posix_PlatformTypes_BSD = 5, - MeshAgent_Posix_PlatformTypes_WINDOWS = 10 + MeshAgent_Posix_PlatformTypes_WINDOWS = 10, + MeshAgent_Posix_PlatformTypes_PROCD = 7 }MeshAgent_Posix_PlatformTypes; typedef enum MeshCommand_AuthInfo_CapabilitiesMask