Sha256: b54796fccfb4bd3e2bb77e068424e073392d8508866d27baeca3740d3741531d
Contents?: true
Size: 1.53 KB
Versions: 2
Compression:
Stored size: 1.53 KB
Contents
--- title: About the bsd_service Resource --- # bsd_service Use the `bsd_service` InSpec audit resource to test a service using a Berkeley OS-style `init` on the FreeBSD platform. <br> ## Syntax A `bsd_service` resource block declares the name of a service and then one (or more) matchers to test the state of the service: describe bsd_service('service_name') do it { should be_installed } it { should be_enabled } it { should be_running } end where * `('service_name')` must specify a service name * `be_installed`, `be_enabled`, and `be_running` are valid matchers for this resource. ### Using `bsd_service` resource parameters #### Path The path to the service manager's control may be specified for situations where the path isn't available in the current `PATH`. For example: describe bsd_service('service_name', '/path/to/control') do it { should be_enabled } it { should be_installed } it { should be_running } end <br> ## Supported Properties All properties available to the `service` resource may be used. <br> ## Matchers For a full list of available matchers please visit our [matchers page](https://www.inspec.io/docs/reference/matchers/). ### be_enabled The `be_enabled` matcher tests if the named service is enabled: it { should be_enabled } ### be_installed The `be_installed` matcher tests if the named service is installed: it { should be_installed } ### be_running The `be_running` matcher tests if the named service is running: it { should be_running }
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
inspec-1.51.18 | docs/resources/bsd_service.md.erb |
inspec-1.51.6 | docs/resources/bsd_service.md.erb |