salt.modules.openbsdservice

The service module for OpenBSD

salt.modules.openbsdservice.available(name)

2014.7.0 新版功能.

Returns True if the specified service is available, otherwise returns False.

CLI 范例:

salt '*' service.available sshd
salt.modules.openbsdservice.disabled(name)

2014.7.0 新版功能.

Return True if the named service is disabled, false otherwise

CLI 范例:

salt '*' service.disabled <service name>
salt.modules.openbsdservice.enabled(name, **kwargs)

2014.7.0 新版功能.

Return True if the named service is enabled, false otherwise

CLI 范例:

salt '*' service.enabled <service name>
salt.modules.openbsdservice.get_all()

2014.7.0 新版功能.

Return all available boot services

CLI 范例:

salt '*' service.get_all
salt.modules.openbsdservice.get_disabled()

2014.7.0 新版功能.

Return a set of services that are installed but disabled

CLI 范例:

salt '*' service.get_disabled
salt.modules.openbsdservice.get_enabled()

2014.7.0 新版功能.

Return a list of service that are enabled on boot

CLI 范例:

salt '*' service.get_enabled
salt.modules.openbsdservice.missing(name)

2014.7.0 新版功能.

The inverse of service.available. Returns True if the specified service is not available, otherwise returns False.

CLI 范例:

salt '*' service.missing sshd
salt.modules.openbsdservice.reload(name)

2014.7.0 新版功能.

Reload the named service

CLI 范例:

salt '*' service.reload <service name>
salt.modules.openbsdservice.restart(name)

Restart the named service

CLI 范例:

salt '*' service.restart <service name>
salt.modules.openbsdservice.start(name)

Start the specified service

CLI 范例:

salt '*' service.start <service name>
salt.modules.openbsdservice.status(name, sig=None)

Return the status for a service, returns a bool whether the service is running.

CLI 范例:

salt '*' service.status <service name>
salt.modules.openbsdservice.stop(name)

Stop the specified service

CLI 范例:

salt '*' service.stop <service name>