Created
February 17, 2015 03:00
-
-
Save dellis23/49862d39a4f355e1b3e2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
description "Consul server" | |
start on runlevel [2345] | |
stop on runlevel [!2345] | |
respawn | |
script | |
# Make sure to use all our CPUs, because Consul can block a scheduler thread | |
export GOMAXPROCS=`nproc` | |
BIND=`ifconfig docker0 | grep "inet addr" | awk '{ print substr($2,6) }'` | |
# Allow overriding env vars in /etc/default/consul | |
if [ -f "/etc/default/consul" ]; then | |
. /etc/default/consul | |
fi | |
exec /usr/bin/consul agent \ | |
-config-dir="/etc/consul.d" \ | |
-data-dir="/var/lib/consul/" \ | |
-syslog \ | |
-server \ | |
-bootstrap \ | |
-bind=$BIND \ | |
${CONSUL_FLAGS} | |
end script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I can't get some pretty syntax highlighting to save my life.