formula-vault/vault/files/vault.upstart

25 lines
561 B
Text
Raw Normal View History

2018-05-15 02:13:54 -04:00
{%- from slspath + '/map.jinja' import vault with context -%}
2017-04-11 09:58:37 -04:00
description "Vault server"
start on (runlevel [345] and started network)
stop on (runlevel [!345] or stopping network)
respawn
script
if [ -f "/etc/service/vault" ]; then
. /etc/service/vault
fi
# Make sure to use all our CPUs, because Vault can block a scheduler thread
export GOMAXPROCS=`nproc`
exec /usr/local/bin/vault server \
2018-05-15 02:13:54 -04:00
{%- if vault.config.dev_mode %}
2017-04-24 10:48:25 -04:00
-dev \
{% else %}
2018-05-15 02:13:54 -04:00
-config="/etc/vault.d/config.hcl" \
2017-04-24 10:48:25 -04:00
{% endif -%}
2017-04-11 09:58:37 -04:00
>>/var/log/vault.log 2>&1
end script