Documentation
¶
Overview ¶
Package maclaunchd provides a launchd service adapter for macOS.
Index ¶
- type MacLaunchdService
- func (s *MacLaunchdService) Install(execPath, configPath string, hour, minute int) error
- func (s *MacLaunchdService) IsInstalled() bool
- func (s *MacLaunchdService) LogPath() string
- func (s *MacLaunchdService) PlistPath() string
- func (s *MacLaunchdService) Status() string
- func (s *MacLaunchdService) Uninstall() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MacLaunchdService ¶
type MacLaunchdService struct {
// contains filtered or unexported fields
}
MacLaunchdService implements ports.LaunchdService for macOS.
func (*MacLaunchdService) Install ¶
func (s *MacLaunchdService) Install(execPath, configPath string, hour, minute int) error
Install creates the plist file and loads the service.
func (*MacLaunchdService) IsInstalled ¶
func (s *MacLaunchdService) IsInstalled() bool
IsInstalled checks if the service is currently installed.
func (*MacLaunchdService) LogPath ¶
func (s *MacLaunchdService) LogPath() string
LogPath returns the path where logs should be written.
func (*MacLaunchdService) PlistPath ¶
func (s *MacLaunchdService) PlistPath() string
PlistPath returns the path where the plist file should be stored.
func (*MacLaunchdService) Status ¶
func (s *MacLaunchdService) Status() string
Status returns the current status of the service. Returns "running", "loaded", "not loaded", or error message.
func (*MacLaunchdService) Uninstall ¶
func (s *MacLaunchdService) Uninstall() error
Uninstall unloads the service and removes the plist file.
Click to show internal directories.
Click to hide internal directories.