Documentation
¶
Index ¶
- func DirectoryExists(path string) bool
- func DisableService(serviceName string) error
- func FileExists(path string) bool
- func IsServiceActive(serviceName string) bool
- func ReloadSystemd() error
- func RemoveDirectories(directories []string, logger *logrus.Logger) []error
- func RunCleanupCommand(path string) error
- func RunCommandWithOutput(name string, args ...string) (string, error)
- func RunSystemCommand(name string, args ...string) error
- func ServiceExists(serviceName string) bool
- func StopService(serviceName string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DirectoryExists ¶
DirectoryExists checks if a directory exists
func DisableService ¶
DisableService disables a systemd service
func IsServiceActive ¶
IsServiceActive checks if a systemd service is active
func RemoveDirectories ¶
RemoveDirectories removes multiple directories recursively, continuing on errors
func RunCleanupCommand ¶
RunCleanupCommand removes a file or directory using rm -f, ignoring "not found" errors This is specifically designed for cleanup operations where missing files should not be treated as errors
func RunCommandWithOutput ¶
RunCommandWithOutput executes a command and returns its combined output. The agent runs as root, so no sudo wrapping is needed.
func RunSystemCommand ¶
RunSystemCommand executes a system command for privileged operations. The agent runs as root, so no sudo wrapping is needed.
func ServiceExists ¶
ServiceExists checks if a systemd service unit file exists
Types ¶
This section is empty.