mirror of
https://codeberg.org/scottslowe/learning-tools.git
synced 2026-03-11 09:04:37 +00:00
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.
21 lines
No EOL
397 B
Text
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 |