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.
This commit is contained in:
Amir Yalon 2016-12-22 13:06:32 +02:00 committed by GitHub
parent dc2a54a77b
commit a811bf15f1
1 changed files with 0 additions and 1 deletions

View File

@ -8,7 +8,6 @@ EnvironmentFile=-/etc/sysconfig/consul
Restart=on-failure Restart=on-failure
ExecStart=/usr/local/bin/consul agent $CONSUL_FLAGS -config-dir=/etc/systemd/system/consul.d ExecStart=/usr/local/bin/consul agent $CONSUL_FLAGS -config-dir=/etc/systemd/system/consul.d
ExecReload=/bin/kill -HUP $MAINPID ExecReload=/bin/kill -HUP $MAINPID
KillSignal=SIGINT
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target