libreoffice-online/coolwsd.service
Ashod Nakashian 2d464fd7cc service: change KillMode to mixed
According to the systemd.kill man page, when
KillMode=control-group "all remaining processes
in the control group of this unit will be killed
on unit stop." This ends up killing the kit
processes as well, which prevents saving any
unsaved modifications before shutting down.

The setting we want is 'mixed'. According to
the man page, with mixed "the SIGTERM signal is
sent to the main process while the subsequent
SIGKILL signal is sent to all remaining processes
of the unit's control group."

In other words, with KillMode=mixed, coolwsd
will receive the termination signal and it will
manage its children. But systemd will still
make sure that when coolwsd terminates, or when
it times out, all children and properly killed.

This changes KillMode to mixed.

Change-Id: I4123dfe5143d2cc6223b1542821a10bad86fb449
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-01-16 21:33:52 +01:00

24 lines
633 B
Desktop File

[Unit]
Description=Collabora Online WebSocket Daemon
After=network.target
[Service]
EnvironmentFile=-/etc/sysconfig/coolwsd
ExecStart=/usr/bin/coolwsd --version --o:sys_template_path=/opt/cool/systemplate --o:child_root_path=/opt/cool/child-roots --o:file_server_root_path=/usr/share/coolwsd
KillSignal=SIGINT
TimeoutStopSec=120
User=cool
KillMode=mixed
Restart=always
LimitNOFILE=infinity:infinity
ProtectSystem=strict
ReadWritePaths=/opt/cool /var/log
ProtectHome=yes
PrivateTmp=yes
ProtectControlGroups=yes
CapabilityBoundingSet=CAP_FOWNER CAP_CHOWN CAP_MKNOD CAP_SYS_CHROOT CAP_SYS_ADMIN
[Install]
WantedBy=multi-user.target