mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-01 19:17:58 +00:00
Update the builtin keys; move catalog to core; protect against unset plugin directory
This commit is contained in:
@@ -8,7 +8,6 @@ import (
|
||||
"net/url"
|
||||
"os"
|
||||
"os/signal"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"sort"
|
||||
"strconv"
|
||||
@@ -21,7 +20,6 @@ import (
|
||||
|
||||
colorable "github.com/mattn/go-colorable"
|
||||
log "github.com/mgutz/logxi/v1"
|
||||
homedir "github.com/mitchellh/go-homedir"
|
||||
|
||||
"google.golang.org/grpc/grpclog"
|
||||
|
||||
@@ -245,23 +243,6 @@ func (c *ServerCommand) Run(args []string) int {
|
||||
coreConfig.DevToken = devRootTokenID
|
||||
}
|
||||
|
||||
if config.PluginDirectory == "" {
|
||||
homePath, err := homedir.Dir()
|
||||
if err != nil {
|
||||
c.Ui.Output(fmt.Sprintf(
|
||||
"Error getting user's home directory: %v", err))
|
||||
return 1
|
||||
}
|
||||
coreConfig.PluginDirectory = filepath.Join(homePath, "/.vault-plugins/")
|
||||
err = os.Mkdir(coreConfig.PluginDirectory, 0700)
|
||||
if err != nil && !os.IsExist(err) {
|
||||
c.Ui.Output(fmt.Sprintf(
|
||||
"Error making default plugin directory: %v", err))
|
||||
return 1
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var disableClustering bool
|
||||
|
||||
// Initialize the separate HA storage backend, if it exists
|
||||
|
||||
Reference in New Issue
Block a user