local

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SudoersDir = "/etc/sudoers.d"
	DoasDir    = "/etc/doas.d"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseConfigurer

type BaseConfigurer struct {
}

func (*BaseConfigurer) AppendFile

func (t *BaseConfigurer) AppendFile(path string, data []byte, perm fs.FileMode) error

func (*BaseConfigurer) ApplySudo

func (t *BaseConfigurer) ApplySudo(username string, values []string) error

func (*BaseConfigurer) FileExists

func (t *BaseConfigurer) FileExists(path string) (bool, error)

func (*BaseConfigurer) RunCommand

func (t *BaseConfigurer) RunCommand(args ...string) error

func (*BaseConfigurer) RunScript

func (t *BaseConfigurer) RunScript(script string) error

func (*BaseConfigurer) UserHomeDir

func (t *BaseConfigurer) UserHomeDir(username string) (string, error)

UserHomeDir default implementation returns /home/{username} or /root for the root user

func (*BaseConfigurer) WriteFile

func (t *BaseConfigurer) WriteFile(path string, data []byte, perm fs.FileMode) error

Jump to

Keyboard shortcuts

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