Add KillSignal=SIGTERM to default systemd service file
Description
The current systemd .service file generated by gitlab-runner install
does not set KillSignal, so systemd will send the default SIGTERM and immediately kill the runner and all child processes.
Proposal
It should do a graceful shutdown instead. I would propose the following settings:
[Service]
KillSignal=SIGQUIT
# SIGQUIT goes only to the main process, SIGKILL goes to all processes in the cgroup
KillMode=mixed
Links to related issues and merge requests / references
Tomasz outlined how to properly use KillSignal to initiate a graceful shutdown at #27093 (comment 793812818).
This was done for docker images in !1427 (merged). It was proposed for systemd services in !2409 (closed) but rejected.