Exemplo n.º 1
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);
            }
        }
Exemplo n.º 2
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);
            }
        }