示例#1
0
        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);
        }
示例#2
0
        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);
            }
        }
示例#3
0
        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);
            }
        }