launchd

package
v1.99.4 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2022 License: Apache-2.0 Imports: 12 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 added in v1.24.0

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
	Args           []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