Puppet Advanced Guide--service Resources detailed

Source: Internet
Author: User

Service Resources

The service resource can not only start, restart and close the daemon of the program, monitor the status of the process, but also can add the daemon to the self-boot.

1. Common Properties of service resources


Service {' Resource title ':

Binary

Enable

Ensure

Hasrestart

Hasstatus

Name

Path

Pattern

Restart

Start

Status

Stop

Provider


Enable: Specifies whether the service starts at boot time and can be set to true and false.

ensure: Whether the service is running, running is running, and stopped represents stopping the service.

Name: daemon names.

Path: Starts the script search path.

Hasrestart: Indicates whether the management script supports the restart parameter, and if not, use stop and start to implement the restart effect.

Hasstatus: Indicates whether the management script supports the status parameter, puppet uses the status parameter to determine if the service is already running, and if the status parameter is not supported, Puppet uses the lookup run process list to determine if a service is running.

provider: default is init.


Case

Start the httpd daemon

Service {' httpd ':

ensure = running,

}


Set httpd boot from

Service {' httpd ':

ensure = True,

}



please pay attention to http://www.wzlinux.com:45 and http://www.wzlinux.com .




This article is from the "Small Drops Linux" blog, make sure to keep this source http://wangzan18.blog.51cto.com/8021085/1685650

Puppet Advanced Guide--service Resources detailed

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.