Skip to content

Instantly share code, notes, and snippets.

@ewilde
Forked from yunano/vault.service
Last active December 10, 2021 16:56
Show Gist options
  • Save ewilde/b3f622e0899b5188263238c2e54054c9 to your computer and use it in GitHub Desktop.
Save ewilde/b3f622e0899b5188263238c2e54054c9 to your computer and use it in GitHub Desktop.
for development only /etc/systemd/system/vault.service
[Unit]
Description=vault server
Requires=network-online.target
After=network-online.target consul.service
[Service]
EnvironmentFile=-/etc/default/vault
Restart=on-failure
ExecStart=/usr/local/bin/vault server $OPTIONS -config=/etc/vault.d/vault.conf
ExecStartPost=/bin/bash -c "echo 'Waiting for vault to start' && sleep 5s && for key in $KEYS; do echo unsealing with key $key && /usr/local/bin/vault unseal $key; done"
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment