utils

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const AMS_URL = "https://ams.r2dtools.com/v1"
View Source
const (
	SYSTEMD_SERVICE_FILE = "/etc/systemd/system/r2dtools.service"
)

Variables

This section is empty.

Functions

func ExtractTarGz

func ExtractTarGz(file, folder string) error

func GetAgentLatestVersion

func GetAgentLatestVersion() (string, error)

Types

type SH

type SH struct {
	Logger *log.Logger
}

func (*SH) Exec

func (sh *SH) Exec(command string) error

type SystemD

type SystemD struct {
	Logger *log.Logger
	Sh     *SH
}

func (*SystemD) CreateService

func (sd *SystemD) CreateService(binPath, userName, groupName string) error

func (*SystemD) RemoveService

func (sd *SystemD) RemoveService(serviceName string) error

func (*SystemD) StartService

func (sd *SystemD) StartService(serviceName string) error

func (*SystemD) StopService

func (sd *SystemD) StopService(serviceName string) error

Jump to

Keyboard shortcuts

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