7f2b4349f8
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.
14 lines
326 B
Desktop File
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
|