Skip to content

Instantly share code, notes, and snippets.

@daveadams
Last active November 16, 2016 22:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daveadams/b1058abd7c6242809e4e69821b4ea4a7 to your computer and use it in GitHub Desktop.
Save daveadams/b1058abd7c6242809e4e69821b4ea4a7 to your computer and use it in GitHub Desktop.
# upstart config for consul-replicate
# run this on each consul server. "consul lock" will ensure only one is operating per datacenter
#
description "Consul Replicate"
start on started consul
stop on stopping network-services
respawn
console none
setuid consul
setgid consul
exec /usr/local/bin/consul lock locks/consul-replicate /usr/local/bin/consul-replicate -config /etc/consul-replicate/config.hcl -log-level info
# the most likely cause of a stop for this job is if consul is stopped or
# restarted, which will kill the watch, so add a post-stop sleep to prevent
# too-fast respawning
post-stop exec sleep 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment