Systemd.UnitFile.Builder (systemdkit v0.1.2)

Copy Markdown View Source

Typed builders for common systemd unit file sections.

Summary

Functions

Builds a mount unit file from common Unit, Mount, and Install sections.

Builds a path unit file from common Unit, Path, and Install sections.

Builds a unit file with one section.

Builds a unit file from common Unit, Service, and Install sections.

Builds a socket unit file from common Unit, Socket, and Install sections.

Builds a target unit file from common Unit, Target, and Install sections.

Builds a timer unit file from common Unit, Timer, and Install sections.

Types

directives()

@type directives() :: keyword() | %{optional(atom() | String.t()) => term()}

Functions

mount(opts)

@spec mount(keyword()) :: Systemd.UnitFile.t()

Builds a mount unit file from common Unit, Mount, and Install sections.

path(opts)

@spec path(keyword()) :: Systemd.UnitFile.t()

Builds a path unit file from common Unit, Path, and Install sections.

section(name, directives)

@spec section(String.t(), directives()) :: Systemd.UnitFile.t()

Builds a unit file with one section.

service(opts)

@spec service(keyword()) :: Systemd.UnitFile.t()

Builds a unit file from common Unit, Service, and Install sections.

socket(opts)

@spec socket(keyword()) :: Systemd.UnitFile.t()

Builds a socket unit file from common Unit, Socket, and Install sections.

target(opts)

@spec target(keyword()) :: Systemd.UnitFile.t()

Builds a target unit file from common Unit, Target, and Install sections.

timer(opts)

@spec timer(keyword()) :: Systemd.UnitFile.t()

Builds a timer unit file from common Unit, Timer, and Install sections.