open-consul/terraform/shared/scripts/rhel_consul.service
Amir Yalon 7f2b4349f8 Systemd unit to use default 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.
2016-12-22 13:06:32 +02:00

14 lines
326 B
Desktop File

[Unit]
Description=consul agent
Requires=network-online.target
After=network-online.target
[Service]
EnvironmentFile=-/etc/sysconfig/consul
Restart=on-failure
ExecStart=/usr/local/bin/consul agent $CONSUL_FLAGS -config-dir=/etc/systemd/system/consul.d
ExecReload=/bin/kill -HUP $MAINPID
[Install]
WantedBy=multi-user.target