Client for org.freedesktop.systemd1.Manager.
Summary
Functions
Connects to the system bus.
Disables unit files.
Enables unit files.
Gets the D-Bus object path for a loaded unit.
Links unit files into systemd's search path.
Lists currently loaded systemd units.
Masks unit files.
Reloads systemd manager configuration (daemon-reload).
Reloads a unit and returns the queued systemd job.
Restarts a unit and returns the queued systemd job.
Starts a transient unit and returns the queued systemd job.
Starts a unit and returns the queued systemd job.
Stops a unit and returns the queued systemd job.
Unmasks unit files.
Functions
@spec connect(keyword()) :: {:ok, pid()} | {:error, Systemd.Error.t()}
Connects to the system bus.
@spec disable_unit_files(pid(), [String.t()], keyword()) :: {:ok, Systemd.UnitFileOperation.t()} | {:error, Systemd.Error.t()}
Disables unit files.
@spec enable_unit_files(pid(), [String.t()], keyword()) :: {:ok, Systemd.UnitFileOperation.t()} | {:error, Systemd.Error.t()}
Enables unit files.
@spec get_unit(pid(), String.t()) :: {:ok, Systemd.UnitObject.t()} | {:error, Systemd.Error.t()}
Gets the D-Bus object path for a loaded unit.
@spec link_unit_files(pid(), [String.t()], keyword()) :: {:ok, Systemd.UnitFileOperation.t()} | {:error, Systemd.Error.t()}
Links unit files into systemd's search path.
@spec list_units(pid() | keyword()) :: {:ok, [Systemd.Unit.t()]} | {:error, Systemd.Error.t()}
Lists currently loaded systemd units.
Accepts either an existing D-Bus connection PID or connection options. Passing options opens a short-lived connection.
@spec mask_unit_files(pid(), [String.t()], keyword()) :: {:ok, Systemd.UnitFileOperation.t()} | {:error, Systemd.Error.t()}
Masks unit files.
@spec reload(pid()) :: :ok | {:error, Systemd.Error.t()}
Reloads systemd manager configuration (daemon-reload).
@spec reload_unit(pid(), String.t(), keyword()) :: {:ok, Systemd.Job.t()} | {:error, Systemd.Error.t()}
Reloads a unit and returns the queued systemd job.
@spec restart_unit(pid(), String.t(), keyword()) :: {:ok, Systemd.Job.t()} | {:error, Systemd.Error.t()}
Restarts a unit and returns the queued systemd job.
@spec start_transient_unit( pid(), String.t(), [Systemd.TransientUnit.Property.t()], keyword() ) :: {:ok, Systemd.Job.t()} | {:error, Systemd.Error.t()}
Starts a transient unit and returns the queued systemd job.
@spec start_unit(pid(), String.t(), keyword()) :: {:ok, Systemd.Job.t()} | {:error, Systemd.Error.t()}
Starts a unit and returns the queued systemd job.
@spec stop_unit(pid(), String.t(), keyword()) :: {:ok, Systemd.Job.t()} | {:error, Systemd.Error.t()}
Stops a unit and returns the queued systemd job.
@spec unmask_unit_files(pid(), [String.t()], keyword()) :: {:ok, Systemd.UnitFileOperation.t()} | {:error, Systemd.Error.t()}
Unmasks unit files.