launchd

package
v2.41.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Rendered for darwin/amd64

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AgentRunning

func AgentRunning(label string) bool

AgentRunning checks if a launchd service is running

func CheckPlist

func CheckPlist(config AgentConfig) error

func CreatePlist

func CreatePlist(config AgentConfig) error

CreatePlist creates a launchd agent plist config file

func LoadPlist

func LoadPlist(label string) error

LoadPlist loads a launchd agents' plist file

func PlistExists

func PlistExists(label string) bool

func Remove

func Remove(label string) error

Remove removes the agent from launchd

func RemovePlist

func RemovePlist(label string) error

RemovePlist removes a launchd agent plist config file

func RestartAgent

func RestartAgent(label string) error

RestartAgent restarts a launchd agent

func StartAgent

func StartAgent(label string) error

StartAgent starts a launchd agent

func StopAgent

func StopAgent(label string) error

StopAgent stops a launchd agent

func UnloadPlist

func UnloadPlist(label string) error

UnloadPlist Unloads a launchd agent's service

Types

type AgentConfig

type AgentConfig struct {
	Label          string
	ExecutablePath string
	StdOutFilePath string
	StdErrFilePath string
	Args           []string
	Env            map[string]string
}

AgentConfig is struct to contain configuration for agent plist file

Jump to

Keyboard shortcuts

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