operations.systemd
Provides operations related to the systemd init system.
Functions
def systemd.daemon_reload()
systemd.daemon_reload()
Manages a systemd unit.
Parameters
user_mode: Whether
systemctl --user
should be used to make user specific changes.name: The name for the operation.
check: If True, returning
op.failure()
will raise an OperationError. All manually raised OperationErrors will be propagated. When False, any manually raised OperationError will be caught andop.failure()
will be returned with the given message while continuing execution.op: The operation wrapper. Must not be supplied by the user.
def systemd.service()
systemd.service()
Manages a systemd unit.
Parameters
service: The unit to manage.
state: The desired state of the unit. Valid options are
started
,restarted
,reloaded
andstopped
. If None, the service's current state will not be changed.enabled: Whether the unit should be started on boot.
user_mode: Whether
systemctl --user
should be used to make user specific changes.name: The name for the operation.
check: If True, returning
op.failure()
will raise an OperationError. All manually raised OperationErrors will be propagated. When False, any manually raised OperationError will be caught andop.failure()
will be returned with the given message while continuing execution.op: The operation wrapper. Must not be supplied by the user.
Last updated