Skip to content

grlx.ingredients.service

The service ingredient handles the management of system services. grlx uses a provider interface, so the same recipe syntax works across different init systems. See service providers for supported backends.

Checks if a service is masked and masks it if it is not

parameter type required description
name string yes the name of the service unit
userMode bool no to use service in user mode, false by default
service.masked:
- name: ssd-backup
- userMode: true

Checks if a service is unmasked and unmasks it if it is not

parameter type required description
name string yes the name of the service unit
userMode bool no to use service in user mode, false by default
service.unmasked:
- name: ssd-backup
- userMode: true

Checks if a service is running and starts it if it is not

parameter type required description
name string yes the name of the service unit
userMode bool no to use service in user mode, false by default
service.running:
- name: docker.service
- userMode: false

Checks if a service is stopped and stops it if it is not

parameter type required description
name string yes the name of the service unit
userMode bool no to use service in user mode, false by default
service.stopped:
- name: docker.service
- userMode: false

Checks if a service is enabled and enables it if it is not

parameter type required description
name string yes the name of the service unit
userMode bool no to use service in user mode, false by default
service.enabled:
- name: cronie.service
- userMode: false

Checks if a service is disabled and disables it if it is not

parameter type required description
name string yes the name of the service unit
userMode bool no to use service in user mode, false by default
service.disabled:
- name: cronie.service
- userMode: false

Restarts a service

parameter type required description
name string yes the name of the service unit
userMode bool no to use service in user mode, false by default
service.restarted:
- name: cronie.service
- userMode: false