diff --git a/debian/open-vault-agent.dirs b/debian/open-vault-agent.dirs new file mode 100644 index 0000000..3e2801e --- /dev/null +++ b/debian/open-vault-agent.dirs @@ -0,0 +1 @@ +etc/vault-agent.d diff --git a/debian/open-vault-agent.links b/debian/open-vault-agent.links new file mode 100644 index 0000000..dcbc820 --- /dev/null +++ b/debian/open-vault-agent.links @@ -0,0 +1 @@ +lib/systemd/system/vault-agent@.service lib/systemd/system/open-vault-agent@.service diff --git a/debian/open-vault-agent@.service b/debian/open-vault-agent@.service new file mode 100644 index 0000000..9601900 --- /dev/null +++ b/debian/open-vault-agent@.service @@ -0,0 +1,26 @@ +[Unit] +Description=Vault agent (config:%i) +Documentation=https://developer.hashicorp.com/vault/docs/agent +After=network.target network-online.target + +ConditionPathIsDirectory=/etc/vault-agent.d/%i +ConditionFileNotEmpty=/etc/vault-agent.d/%i/agent.hcl +StartLimitIntervalSec=300 +StartLimitBurst=20 + +[Service] +User=vault +Group=vault +ExecStart=/bin/vault agent -config=/etc/vault-agent.d/%i/agent.hcl +KillSignal=SIGINT + +Environment=GOMAXPROCS=2 +EnvironmentFile=-/etc/default/vault-agent +EnvironmentFile=-/etc/vault-agent.d/%i/agent.env +WorkingDirectory=/etc/vault-agent.d/%i +TimeoutStopSec=30s +Restart=on-failure +RestartSec=15 + +[Install] +WantedBy=multi-user.target