コード例 #1
0
        /// <summary>
        /// Stop the Chef Client windows service.
        /// </summary>
        /// <param name="timeToWait">Wait time for operation to complete.</param>
        /// <param name="terminateOnFailure">Should the process terminate the processes of the Client service if it failes to stop in alloted time.</param>
        public static void Stop(TimeSpan timeToWait, bool terminateOnFailure)
        {
            var service = new WindowsService()
            {
                Name = "chef-client", TerminateOnFailure = terminateOnFailure, TimeToWait = timeToWait
            };

            service.Stop();
        }
コード例 #2
0
        /// <summary>
        /// Start Chef Client windows service. 
        /// </summary>
        public static void Start(TimeSpan timeToWait)
        {
            RoleEnvironment.Changing += ChefConfigChanging;
            RoleEnvironment.StatusCheck += Chef_StatusCheck;

            // Start Chef Client - wait 30 seconds
            var service = new WindowsService() { Name = "chef-client", TimeToWait = timeToWait };
            service.Start();
            ClientService.statusCheckFilePath = CloudConfigurationManager.GetSetting("ChefClient_SetBusyCheck");
        }
コード例 #3
0
        /// <summary>
        /// Start Chef Client windows service.
        /// </summary>
        public static void Start(TimeSpan timeToWait)
        {
            RoleEnvironment.Changing    += ChefConfigChanging;
            RoleEnvironment.StatusCheck += Chef_StatusCheck;

            // Start Chef Client - wait 30 seconds
            var service = new WindowsService()
            {
                Name = "chef-client", TimeToWait = timeToWait
            };

            service.Start();
            ClientService.statusCheckFilePath = CloudConfigurationManager.GetSetting("ChefClient_SetBusyCheck");
        }
コード例 #4
0
 /// <summary>
 /// Stop the Chef Client windows service.
 /// </summary>
 /// <param name="timeToWait">Wait time for operation to complete.</param>
 /// <param name="terminateOnFailure">Should the process terminate the processes of the Client service if it failes to stop in alloted time.</param>
 public static void Stop(TimeSpan timeToWait, bool terminateOnFailure)
 {
     var service = new WindowsService() { Name = "chef-client", TerminateOnFailure = terminateOnFailure, TimeToWait = timeToWait };
     service.Stop();
 }