mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 06:40:54 +03:00
add memory data provider and use it for portable mode
This commit is contained in:
@@ -143,11 +143,9 @@ func (s *Service) StartPortableMode(sftpdPort int, enableSCP bool) error {
|
||||
}
|
||||
tempDir := os.TempDir()
|
||||
instanceID := xid.New().String()
|
||||
databasePath := filepath.Join(tempDir, instanceID+".db")
|
||||
s.LogFilePath = filepath.Join(tempDir, instanceID+".log")
|
||||
dataProviderConf := config.GetProviderConf()
|
||||
dataProviderConf.Driver = dataprovider.BoltDataProviderName
|
||||
dataProviderConf.Name = databasePath
|
||||
dataProviderConf.Driver = dataprovider.MemoryDataProviderName
|
||||
config.SetProviderConf(dataProviderConf)
|
||||
httpdConf := config.GetHTTPDConfig()
|
||||
httpdConf.BindPort = 0
|
||||
|
||||
Reference in New Issue
Block a user