templates

package
v0.0.0-...-abe41e7 Latest Latest
Warning

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

Go to latest
Published: May 23, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetOneshotUnit

func GetOneshotUnit(s Oneshot) string

func GetServiceUnit

func GetServiceUnit(s Service) string

func GetTimerUnit

func GetTimerUnit(t Timer) string

Types

type Oneshot

type Oneshot struct {
	Description      string
	Wants            string // timer unit file name
	ExecStart        string // command to run
	WorkingDirectory string // directory where the ExecStart command is run
}

type RestartType

type RestartType string
const (
	RestartAlways    RestartType = "always"
	RestartOnFailure RestartType = "on-failure"
	RestartNo        RestartType = "no"
)

type Service

type Service struct {
	Description      string
	Restart          RestartType
	RestartSec       int
	ExecStart        string // command to run
	WorkingDirectory string // directory where the ExecStart command is run
}

type Timer

type Timer struct {
	Description string
	OnCalendar  string
	Service     string // service unit file name
}

Jump to

Keyboard shortcuts

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