1
0
Fork 0
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:
Anthony Lapenna 2017-01-03 08:32:53 +13:00 committed by GitHub
parent 816c1ea448
commit 9ee652c818
2 changed files with 31 additions and 16 deletions

View file

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