diff options
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -13,16 +13,19 @@ import ( "log" "net" "net/http" + "os" ) func main() { log.Println("=== Starting Bagage ===") config := (&Config{}).LoadWithDefault().LoadWithEnv() - log.Println(config) - done := make(chan error) + // Some init + os.MkdirAll(config.S3Cache, 0755) + // Launch our submodules + done := make(chan error) go httpServer(config, done) go sshServer(config, done) @@ -148,7 +151,7 @@ func handleSSHConn(nConn net.Conn, dconfig *Config, config *ssh.ServerConfig) { return } - fs := s3.NewS3FS(mc) + fs := s3.NewS3FS(mc, dconfig.S3Cache) server, err := sftp.NewServer(ctx, channel, &fs) if err != nil { |