Fix log directory creation

This commit is contained in:
2025-07-19 22:20:31 +02:00
parent b739767317
commit d706afc2a8

View File

@@ -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)