mirror of
https://github.com/lordmathis/llamactl.git
synced 2025-11-06 00:54:23 +00:00
Fix log directory creation
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
llamactl "llamactl/pkg"
|
llamactl "llamactl/pkg"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"os"
|
||||||
)
|
)
|
||||||
|
|
||||||
// @title llamactl API
|
// @title llamactl API
|
||||||
@@ -20,6 +21,13 @@ func main() {
|
|||||||
fmt.Println("Using default configuration.")
|
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
|
// Initialize the instance manager
|
||||||
instanceManager := llamactl.NewInstanceManager(config.Instances)
|
instanceManager := llamactl.NewInstanceManager(config.Instances)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user