Skip to content

Instantly share code, notes, and snippets.

@jun06t
Created July 31, 2018 18:14
Show Gist options
  • Save jun06t/870d72b80bd2e90a7e2cc4fb94a58e71 to your computer and use it in GitHub Desktop.
Save jun06t/870d72b80bd2e90a7e2cc4fb94a58e71 to your computer and use it in GitHub Desktop.
Vault server systemd
### BEGIN INIT INFO
# Provides: vault
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Vault server
# Description: Vault secret management tool
### END INIT INFO
[Unit]
Description=Vault secret management tool
Requires=network-online.target
After=network-online.target
[Service]
User=vault
Group=vault
PIDFile=/var/run/vault/vault.pid
PermissionsStartOnly=true
ExecStartPre=-/bin/mkdir -p /var/run/vault
ExecStartPre=/bin/chown -R vault:vault /var/run/vault
ExecStart=/usr/local/bin/vault server \
-config=/usr/local/etc/vault/vault_server.hcl \
-log-level=debug
ExecReload=/bin/kill -HUP $MAINPID
LimitNOFILE=65536
KillMode=process
KillSignal=SIGTERM
Restart=on-failure
RestartSec=42s
LimitMEMLOCK=infinity
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment