formula-vault/vault/files/vault.service
Eric Renfro e83b34c806 Fix systemd service unit
EnvironmentFile was statically set when it should've been pointing to
/etc/default/vault
for Debian and
/etc/sysconfig/vault
for CentOS/EL.
2018-05-16 14:50:13 -04:00

18 lines
696 B
Desktop File

[Unit]
Description=vault server
Requires=network-online.target
After=network-online.target{% if config.storage and config.storage.type == "consul" %} consul.service{% endif %}
[Service]
EnvironmentFile=-/etc/{% if grains['os_family'] == 'Debian' %}default{% else %}sysconfig{% endif %}/vault
User={{ user }}
Group={{ group }}
ExecStart=/usr/local/bin/vault server {% if config.dev_mode %}-dev{% else %}-config="/etc/vault.d/config.hcl"{% endif %}
ExecReload=/bin/kill -signal HUP $MAINPID
ExecStop=/usr/local/bin/vault operator step-down
Restart=on-failure
CapabilityBoundingSet=CAP_SYSLOG CAP_IPC_LOCK
AmbientCapabilities=CAP_IPC_LOCK
SecureBits=keep-caps
NoNewPrivileges=yes
KillSignal=SIGINT