open-nomad/terraform/shared/config/consul_upstart.conf

26 lines
513 B
Plaintext
Raw Normal View History

description "Consul"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
console log
script
if [ -f "/etc/service/consul" ]; then
. /etc/service/consul
fi
# Make sure to use all our CPUs, because Consul can block a scheduler thread
export GOMAXPROCS=`nproc`
export CONSUL_ALLOW_PRIVILEGED_PORTS=true
exec /usr/local/bin/consul agent \
-config-dir="/etc/consul.d" \
-dns-port="53" \
-recursor="172.31.0.2" \
\$${CONSUL_FLAGS} \
>>/var/log/consul.log 2>&1
end script