salt.modules.freebsdservice

The service module for FreeBSD

salt.modules.freebsdservice.available(name)

Check that the given service is available.

CLI Example:

salt '*' service.available sshd
salt.modules.freebsdservice.disable(name, **kwargs)

Disable the named service to start at boot

Arguments the same as for enable()

CLI Example:

salt '*' service.disable <service name>
salt.modules.freebsdservice.disabled(name)

Return True if the named service is enabled, false otherwise

CLI Example:

salt '*' service.disabled <service name>
salt.modules.freebsdservice.enable(name, **kwargs)

Enable the named service to start at boot

name
service name
config : /etc/rc.conf

Config file for managing service. If config value is empty string, then /etc/rc.conf.d/<service> used. See man rc.conf(5) for details.

Also service.config variable can be used to change default.

CLI Example:

salt '*' service.enable <service name>
salt.modules.freebsdservice.enabled(name, **kwargs)

Return True if the named service is enabled, false otherwise

name
Service name

CLI Example:

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

Return a list of all available services

CLI Example:

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

Return what services are available but not enabled to start at boot

CLI Example:

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

Return what services are set to run on boot

CLI Example:

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

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

CLI Example:

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

Restart the named service

CLI Example:

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

Restart the named service

CLI Example:

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

Start the specified service

CLI Example:

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

Return the status for a service (True or False).

name
Name of service

CLI Example:

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

Stop the specified service

CLI Example:

salt '*' service.stop <service name>