From 688943906a0886b79ebe2347a0a73ec7eb58c499 Mon Sep 17 00:00:00 2001 From: Ashod Nakashian Date: Fri, 1 Nov 2019 11:32:23 -0400 Subject: service: improve stop and reload SIGINT is the clean way of stopping the service, while SIGTERM is be the faster and rude way. So first we want to use SIGINT and only when we timeout do we want SIGTERM to be used. Here we ask systemd to stop WSD by sending SIGINT and wait for 120 seconds. After that timeout, it will assume the service is hung and needs to be aborted. We expect that by then we would have saved all documents and cleanly exited. 120 seconds should be sufficient time to save, close, and upload the open documents. Change-Id: I08321814db942d89a44cfce42885840f4afa279c Reviewed-on: https://gerrit.libreoffice.org/81976 Reviewed-by: Andras Timar Tested-by: Andras Timar --- loolwsd.service | 2 ++ 1 file changed, 2 insertions(+) (limited to 'loolwsd.service') diff --git a/loolwsd.service b/loolwsd.service index d43d59078..93e98fd67 100644 --- a/loolwsd.service +++ b/loolwsd.service @@ -5,6 +5,8 @@ After=network.target [Service] EnvironmentFile=-/etc/sysconfig/loolwsd ExecStart=/usr/bin/loolwsd --version --o:sys_template_path=/opt/lool/systemplate --o:child_root_path=/opt/lool/child-roots --o:file_server_root_path=/usr/share/loolwsd +KillSignal=SIGINT +TimeoutStopSec=120 User=lool KillMode=control-group Restart=always -- cgit v1.2.3