Created
February 17, 2015 00:27
-
-
Save dellis23/f6f3cbaedf438be14823 to your computer and use it in GitHub Desktop.
Seriously? No bash syntax highlighting? I guess ActionScript looks nice.
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