[Unit]
Description=Consul Agent
After=network.target

[Service]
User=<%= scope.lookupvar('consul::user') %>
Group=<%= scope.lookupvar('consul::group') %>
ExecStart=<%= scope.lookupvar('consul::bin_dir') %>/consul agent \
  -config-dir <%= scope.lookupvar('consul::config_dir') %> <%= scope.lookupvar('consul::extra_options') %>
ExecReload=/bin/kill -HUP $MAINPID
Restart=always
LimitNOFILE=131072

[Install]
WantedBy=multi-user.target

[Unit]
Description=Consul Agent
After=network.target

[Service]
User=<%= scope.lookupvar('consul::user') %>
Group=<%= scope.lookupvar('consul::group') %>
ExecStart=<%= scope.lookupvar('consul::bin_dir') %>/consul agent \
  -config-dir <%= scope.lookupvar('consul::config_dir') %> <%= scope.lookupvar('consul::extra_options') %>
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
LimitNOFILE=131072

[Install]
WantedBy=multi-user.target

Change Systemd Restart= to on-failure
Change Systemd Restart= to on-failure

Let a human shut the agent down manually with a kill signal.
