From e10f04c5e36109c2e58d667c4b6ec054cbdd51be Mon Sep 17 00:00:00 2001 From: Quentin Date: Sat, 20 Nov 2021 13:42:20 +0100 Subject: It seems to work --- main.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'main.go') diff --git a/main.go b/main.go index bf7dc5e..c70dd4d 100644 --- a/main.go +++ b/main.go @@ -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 { -- cgit v1.2.3