portable mode: add Azure Blob support

This commit is contained in:
Nicola Murino
2020-10-25 21:42:43 +01:00
parent 9b49f63a97
commit f2acde789d
5 changed files with 62 additions and 8 deletions

View File

@@ -27,8 +27,11 @@ func (s *Service) StartPortableMode(sftpdPort, ftpPort, webdavPort int, enabledS
if s.PortableMode != 1 {
return fmt.Errorf("service is not configured for portable mode")
}
var err error
rand.Seed(time.Now().UnixNano())
err := config.LoadConfig(s.ConfigDir, s.ConfigFile)
if err != nil {
fmt.Printf("error loading configuration file: %v using defaults\n", err)
}
if len(s.PortableUser.Username) == 0 {
s.PortableUser.Username = "user"
}