service

package
v2.0.0-...-83f77b2 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2022 License: AGPL-3.0 Imports: 24 Imported by: 0

Documentation

Overview

Package service allows to start and stop the SFTPGo service

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetGraceTime

func SetGraceTime(val int)

SetGraceTime sets the grace time

Types

type Service

type Service struct {
	ConfigDir         string
	ConfigFile        string
	LogFilePath       string
	LogMaxSize        int
	LogMaxBackups     int
	LogMaxAge         int
	PortableMode      int
	PortableUser      dataprovider.User
	LogCompress       bool
	LogLevel          string
	LogUTCTime        bool
	LoadDataClean     bool
	LoadDataFrom      string
	LoadDataMode      int
	LoadDataQuotaScan int
	Shutdown          chan bool
	Error             error
}

Service defines the SFTPGo service

func (*Service) LoadInitialData

func (s *Service) LoadInitialData() error

LoadInitialData if a data file is set

func (*Service) Start

func (s *Service) Start(disableAWSInstallationCode bool) error

Start initializes and starts the service

func (*Service) StartPortableMode

func (s *Service) StartPortableMode(sftpdPort, ftpPort, webdavPort int, enabledSSHCommands []string,
	ftpsCert, ftpsKey, webDavCert, webDavKey string) error

StartPortableMode starts the service in portable mode

func (*Service) Stop

func (s *Service) Stop()

Stop terminates the service unblocking the Wait method

func (*Service) Wait

func (s *Service) Wait()

Wait blocks until the service exits

Jump to

Keyboard shortcuts

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