[Unit]
Description=Consul Service Discovery Agent
After=network-online.target

[Service]
Type=simple
Restart=on-failure
User=consul
Group=consul
RestartSec=3
StateDirectory=consul
ExecStart=/usr/local/bin/consul agent -config-dir /etc/consul.d/

[Install]
WantedBy=multi-user.target