mirror of
https://github.com/portainer/portainer.git
synced 2025-08-02 20:35:25 +02:00
fix(api): creates the data directory if not exist (#452)
This commit is contained in:
parent
816c1ea448
commit
9ee652c818
2 changed files with 31 additions and 16 deletions
|
@ -29,6 +29,11 @@ func main() {
|
|||
Logo: *flags.Logo,
|
||||
}
|
||||
|
||||
fileService, err := file.NewService(*flags.Data, "")
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
var store = bolt.NewStore(*flags.Data)
|
||||
err = store.Open()
|
||||
if err != nil {
|
||||
|
@ -41,11 +46,6 @@ func main() {
|
|||
log.Fatal(err)
|
||||
}
|
||||
|
||||
fileService, err := file.NewService(*flags.Data)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
var cryptoService portainer.CryptoService = &crypto.Service{}
|
||||
|
||||
// Initialize the active endpoint from the CLI only if there is no
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue