autostartconf

package
v0.6.248 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecCommands added in v0.6.198

func ExecCommands(commands [][]string) error
func ShouldSymlink() bool

Types

type AptBinaryConfigurer added in v0.6.109

type AptBinaryConfigurer struct {
	LinuxSystemdConfigurer
	URL  string
	Name string
	// contains filtered or unexported fields
}

func (AptBinaryConfigurer) Install added in v0.6.109

func (abc AptBinaryConfigurer) Install() error

type AutoStartStore

type AutoStartStore interface {
	CopyBin(targetBin string) error
	WriteString(path, data string) error
	GetOSUser() string
	UserHomeDir() (string, error)
	Remove(target string) error
	FileExists(target string) (bool, error)
	DownloadBinary(url string, target string) error
}

type DaemonConfigurer

type DaemonConfigurer interface {
	Install() error
	UnInstall() error
}

func NewBrevMonConfigure added in v0.6.106

func NewBrevMonConfigure(
	store AutoStartStore,
	disableAutostop bool,
	reportInterval string,
	portToCheckTrafficOn string,
) DaemonConfigurer

func NewRPCConfig added in v0.6.24

func NewRPCConfig(store AutoStartStore) DaemonConfigurer

func NewSSHConfigurer added in v0.6.32

func NewSSHConfigurer(store AutoStartStore) DaemonConfigurer

func NewVPNConfig added in v0.6.24

func NewVPNConfig(store AutoStartStore) DaemonConfigurer

type DarwinPlistConfigurer added in v0.6.24

type DarwinPlistConfigurer struct {
	Store           AutoStartStore
	ValueConfigFile string
	ServiceName     string
	ServiceType     DarwinServiceType
}

func (DarwinPlistConfigurer) GetDestination added in v0.6.24

func (dpc DarwinPlistConfigurer) GetDestination() (string, error)

func (DarwinPlistConfigurer) GetDestinationDirectory added in v0.6.24

func (dpc DarwinPlistConfigurer) GetDestinationDirectory() (string, error)

func (DarwinPlistConfigurer) GetExecCommand added in v0.6.24

func (dpc DarwinPlistConfigurer) GetExecCommand() ([][]string, error)

func (DarwinPlistConfigurer) Install added in v0.6.24

func (dpc DarwinPlistConfigurer) Install() error

func (DarwinPlistConfigurer) UnInstall added in v0.6.24

func (dpc DarwinPlistConfigurer) UnInstall() error

type DarwinServiceType added in v0.6.24

type DarwinServiceType string
const (
	System     DarwinServiceType = "system"
	SingleUser DarwinServiceType = "singleuser"
)

type LinuxSystemdConfigurer

type LinuxSystemdConfigurer struct {
	Store           AutoStartStore
	ValueConfigFile string
	ServiceName     string
	ServiceType     string
	TargetBin       string
}
func (lsc LinuxSystemdConfigurer) CreateForcedSymlink() error

CreateForcedSymlink aims to be the equivalent operation as running ln -sf /lib/systemd/system/huproxy.service /etc/systemd/system/default.target.wants/huproxy.service which overwrite's an existing symbolic link to point to a different file which we need to do in the workspace docker image because systemd isn't running at build time.

func (LinuxSystemdConfigurer) Install

func (lsc LinuxSystemdConfigurer) Install() error

func (LinuxSystemdConfigurer) UnInstall

func (lsc LinuxSystemdConfigurer) UnInstall() error

type StaticBinaryConfigurer added in v0.6.106

type StaticBinaryConfigurer struct {
	LinuxSystemdConfigurer
	URL  string
	Name string
}

func (StaticBinaryConfigurer) Install added in v0.6.106

func (sbc StaticBinaryConfigurer) Install() error

Jump to

Keyboard shortcuts

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