protected override bool isServiceRunning(TimeSpan timeout, string service) { bool isRunning = false; string host = ParseHostName(ServerName); NodeOSInfo osInfo = HostInfo.GetHostInfo(host); if (osInfo == null) { return(isRunning); } if (osInfo.HostOS == OSInfo.Linux) { ExecuteUnixServiceCommand(timeout, ServiceOptions.ISRUNNING, ""); isRunning = isRunningOnUnix; } else { isRunning = base.isServiceRunning(timeout, ServiceNames.JVCACHE); } return(isRunning); }
protected override void Restart(TimeSpan timeout, string service) { string host = ParseHostName(ServerName); NodeOSInfo osInfo = HostInfo.GetHostInfo(host); if (osInfo == null) { return; } if (osInfo.HostOS == OSInfo.Linux) { ExecuteUnixServiceCommand(timeout, ServiceOptions.RESTART, ""); } else { base.Restart(timeout, ServiceNames.JVCACHE); } }
public override void RestartSvcAfterNICChanged(TimeSpan timeout, string previousServerNode) { string host = ParseHostName(previousServerNode); NodeOSInfo osInfo = HostInfo.GetHostInfo(host); if (osInfo == null) { return; } if (osInfo.HostOS == OSInfo.Linux) { ExecuteUnixServiceCommand(timeout, ServiceOptions.RESTARTNICCHANGE, previousServerNode); } else { base.Restart(timeout, ServiceNames.JVCACHE); } }