Skip to content

Instantly share code, notes, and snippets.

@yoavzuri
Created July 19, 2015 21:34
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 yoavzuri/0401873b0400ccf1c003 to your computer and use it in GitHub Desktop.
Save yoavzuri/0401873b0400ccf1c003 to your computer and use it in GitHub Desktop.
description "Consul client process"
start on (local-filesystems and net-device-up IFACE=eth0)
stop on runlevel [!12345]
respawn
setuid consul
setgid consul
env IPSEC_WAN=`ipsec status | grep "==" | awk '{print $2}' | cut -d'/' -f1`
exec consul agent -data-dir /tmp -server -join-wan 10.10.10.10 -advertise-wan $IPSEC_WAN -bootstrap 1 -dc=dc1
start consul
sleep 10
consul info
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment