Documentation ¶
Index ¶
- Constants
- func FileFromNetworkdUnit(unit config.NetworkdUnit) *config.File
- func FileFromSystemdUnit(unit config.SystemdUnit) *config.File
- func FileFromUnitDropin(unit config.SystemdUnit, dropin config.SystemdUnitDropIn) *config.File
- func NetworkdUnitsPath() string
- func SystemdDropinsPath(unitName string) string
- func SystemdUnitsPath() string
- type Util
- func (u Util) AuthorizeSSHKeys(c config.User) error
- func (u Util) CreateGroup(g config.Group) error
- func (u Util) CreateUser(c config.User) error
- func (u Util) EnableUnit(unit config.SystemdUnit) error
- func (u Util) JoinPath(path ...string) string
- func (u Util) MaskUnit(unit config.SystemdUnit) error
- func (u Util) SetPasswordHash(c config.User) error
- func (u Util) WriteFile(f *config.File) error
Constants ¶
View Source
const ( DefaultDirectoryPermissions config.FileMode = 0755 DefaultFilePermissions config.FileMode = 0644 )
View Source
const (
DefaultPresetPermissions os.FileMode = 0644
)
Variables ¶
This section is empty.
Functions ¶
func FileFromNetworkdUnit ¶
func FileFromNetworkdUnit(unit config.NetworkdUnit) *config.File
func FileFromSystemdUnit ¶
func FileFromSystemdUnit(unit config.SystemdUnit) *config.File
func FileFromUnitDropin ¶
func FileFromUnitDropin(unit config.SystemdUnit, dropin config.SystemdUnitDropIn) *config.File
func NetworkdUnitsPath ¶
func NetworkdUnitsPath() string
func SystemdDropinsPath ¶
func SystemdUnitsPath ¶
func SystemdUnitsPath() string
Types ¶
type Util ¶
Util encapsulates logging and destdir indirection for the util methods.
func (Util) AuthorizeSSHKeys ¶
Add the provided SSH public keys to the user's authorized keys.
func (Util) CreateGroup ¶
CreateGroup creates the group as described.
func (Util) CreateUser ¶
CreateUser creates the user as described.
func (Util) EnableUnit ¶
func (u Util) EnableUnit(unit config.SystemdUnit) error
func (Util) SetPasswordHash ¶
SetPasswordHash sets the password hash of the specified user.
Click to show internal directories.
Click to hide internal directories.