feat(go): further adapt to the new socket location

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
main
Raito Bezarius 1 month ago
parent 41e83f4b39
commit a88d971d02

@ -12,7 +12,7 @@ import (
) )
const ( const (
systemdVaultdir = "/run/systemd-vaultd/secrets" systemdVaultdir = "/run/systemd-openbaod/secrets"
) )
func updateSecrets(serviceName, target string) error { func updateSecrets(serviceName, target string) error {

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

Loading…
Cancel
Save