systemd

package
v1.15.1 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2020 License: Apache-2.0 Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

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