[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
KillSignal=INT
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=always
LimitNOFILE=131072

[Install]
WantedBy=multi-user.target

Revert to default Systemd KillSignal of SIGTERM
Revert to default Systemd KillSignal of SIGTERM

Since Consul 0.7, client-mode agents are shutting down gracefully by
default, so no need to send them a SIGINT specially. The default for
server-mode agents is still not to leave gracefully on SIGTERM, but it
was left this way for a reason. To override this, it is better to set
the leave_on_terminate option, rather than changing the KillSignal.
