scottslowe-learning-tools/consul/consul.conf
Scott S. Lowe 7f7806ba8e Fix issue with Consul configuration on VirtualBox
Modify `consul.conf` to force Consul to bind to eth1 instead of eth0. Edit `server.json` to use the correct working directory for Consul, as created by `consul.sh` during provisioning.
2016-09-21 09:53:14 -06:00

21 lines
No EOL
397 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