From d706afc2a82861b4ae07f1ab52a717d8ea94a533 Mon Sep 17 00:00:00 2001 From: LordMathis Date: Sat, 19 Jul 2025 22:20:31 +0200 Subject: [PATCH] Fix log directory creation --- server/cmd/llamactl.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/server/cmd/llamactl.go b/server/cmd/llamactl.go index 36171e7..6d85de6 100644 --- a/server/cmd/llamactl.go +++ b/server/cmd/llamactl.go @@ -4,6 +4,7 @@ import ( "fmt" llamactl "llamactl/pkg" "net/http" + "os" ) // @title llamactl API @@ -20,6 +21,13 @@ func main() { fmt.Println("Using default configuration.") } + // Crate the log directory if it doesn't exist + err = os.MkdirAll(config.Instances.LogDirectory, 0755) + if err != nil { + fmt.Printf("Error creating log directory: %v\n", err) + return + } + // Initialize the instance manager instanceManager := llamactl.NewInstanceManager(config.Instances)