scottslowe-learning-tools/consul-ansible/consul.conf
Scott S. Lowe 3ab300285e Fix problem with Consul configuration on VirtualBox
Edit Consul Upstart configuration to force Consul to bind to secondary Ethernet interface. This fixes problems when using this environment with VirtualBox.
2016-09-21 11:08:58 -06:00

21 lines
398 B
Text

description "Consul server process"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
script
if [ -f "/etc/service/consul" ]; then
. /etc/service/consul
fi
export GOMAXPROCS=`nproc`
BIND_ADDR=`hostname -I | cut -f2 -d' '`
exec /usr/local/bin/consul agent \
-config-dir="/etc/consul.d/server" \
-bind $BIND_ADDR \
${CONSUL_FLAGS} \
>>/var/log/consul.log 2>&1
end script