Created
June 1, 2016 17:51
-
-
Save daveadams/069bc2f636e7c04745054fee94f02ec5 to your computer and use it in GitHub Desktop.
Consul upstart config
This file contains hidden or 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 Agent" | |
start on (local-filesystems and net-device-up IFACE!=lo) | |
stop on stopping network-services | |
respawn | |
console none | |
setuid consul | |
setgid consul | |
env CONSUL_CONF_DIR=/etc/consul.d | |
script | |
export GOMAXPROCS=`nproc` | |
. /etc/default/consul | |
exec /usr/local/bin/consul agent -config-dir=${CONSUL_CONF_DIR} ${CONSUL_FLAGS} | |
end script | |
pre-stop exec /usr/local/bin/consul leave |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment