systemd

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDropIns added in v0.25.0

func CreateDropIns(dir string, files []string) error

func Generate

func Generate(config Config) error

Generate systemd unit

func GetServiceFile added in v0.9.0

func GetServiceFile(profileName, commandName string) string

GetServiceFile returns the service file name for the profile

func GetServiceFileDropInDir added in v0.25.0

func GetServiceFileDropInDir(profileName, commandName string) string

GetServiceFileDropInDir returns the service file drop-in dir name for the profile

func GetSystemDir added in v0.9.0

func GetSystemDir() string

GetSystemDir returns the path where the local systemd units are stored

func GetTimerFile added in v0.9.0

func GetTimerFile(profileName, commandName string) string

GetTimerFile returns the timer file name for the profile

func GetTimerFileDropInDir added in v0.27.0

func GetTimerFileDropInDir(profileName, commandName string) string

GetTimerFileDropInDir returns the timer file drop-in dir name for the profile

func GetUserDir added in v0.9.0

func GetUserDir() (string, error)

GetUserDir returns the default directory where systemd stores user units

func IsTimerDropIn added in v0.27.0

func IsTimerDropIn(file string) bool

Types

type Config added in v0.16.0

type Config struct {
	CommandLine          string
	Environment          []string
	WorkingDirectory     string
	Title                string
	SubTitle             string
	JobDescription       string
	TimerDescription     string
	Schedules            []string
	UnitType             UnitType
	Priority             string // standard or background
	UnitFile             string
	TimerFile            string
	DropInFiles          []string
	AfterNetworkOnline   bool
	Nice                 int
	CPUSchedulingPolicy  string
	IOSchedulingClass    int
	IOSchedulingPriority int
}

Config for generating systemd unit and timer files

type UnitType added in v0.9.0

type UnitType int

UnitType is either user or system

const (
	UserUnit UnitType = iota
	SystemUnit
)

Type of systemd unit

Jump to

Keyboard shortcuts

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