fix defaults for systemd runtime directory

main
Jörg Thalheim 2 years ago
parent 9940f95935
commit 57730f392a

@ -1,2 +1,2 @@
vault: vault server -dev
systemd-vault: go run .
systemd-vaultd: go run . -secrets tmp/secrets -sock tmp/sock

@ -17,3 +17,7 @@ lint:
# Run unitests
test:
pytest -s ./tests
# Local vault + systemd-vaultd
up:
hivemind

@ -142,13 +142,13 @@ var secretDir, socketDir string
func init() {
defaultDir := os.Getenv("SYSTEMD_VAULT_SECRETS")
if defaultDir == "" {
defaultDir = "/run/systemd-vault"
defaultDir = "/run/systemd-vaultd/secrets"
}
flag.StringVar(&secretDir, "secrets", defaultDir, "directory where secrets are looked up")
defaultSock := os.Getenv("SYSTEMD_VAULT_SOCK")
if defaultSock == "" {
defaultSock = "/run/systemd-vault.sock"
defaultSock = "/run/systemd-vaultd/sock"
}
flag.StringVar(&socketDir, "sock", defaultSock, "unix socket to listen to for systemd requests")
flag.Parse()

Loading…
Cancel
Save