Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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