systemd

package
v1.19.0-alpha.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 24, 2020 License: Apache-2.0 Imports: 5 Imported by: 52

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UnitExtensions = []string{
	".automount",
	".device",
	".mount",
	".path",
	".scope",
	".service",
	".slice",
	".socket",
	".swap",
	".target",
	".timer",
}

UnitExtensions is a slice containing all valid systemd unit file extensions. See https://www.freedesktop.org/software/systemd/man/systemd.unit.html

Functions

func EscapeCommand

func EscapeCommand(argv []string) string

EscapeCommand is used to escape a command

func UnitFileExtensionValid added in v1.11.0

func UnitFileExtensionValid(name string) bool

UnitFileExtensionValid checks whether the provided filename ends with a valid systemd unit file extension.

Types

type Manifest

type Manifest struct {
	// contains filtered or unexported fields
}

Manifest defines a systemd unit

func (*Manifest) Render

func (m *Manifest) Render() string

Render is responsible for generating the final unit

func (*Manifest) Set

func (m *Manifest) Set(name, key, value string)

Set adds a key/pair to the a section in the systemd manifest

func (*Manifest) SetSection

func (m *Manifest) SetSection(name, content string)

SetSection sets the raw content of a section

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL