Add TimeoutStopSec=10s for systemctl kill to work faster

This commit is contained in:
Girish Ramakrishnan
2022-11-02 18:46:20 +01:00
parent 59783eb11b
commit 0f0a98f7ac
2 changed files with 4 additions and 2 deletions
+2 -2
View File
@@ -32,9 +32,9 @@ readonly id=$(id -u $SUDO_USER)
readonly ubuntu_version=$(lsb_release -rs)
if [[ "${ubuntu_version}" == "16.04" ]]; then
options="-p MemoryLimit=${memory_limit_mb}M --remain-after-exit"
options="-p TimeoutStopSec=10s -p MemoryLimit=${memory_limit_mb}M --remain-after-exit"
else
options="-p MemoryMax=${memory_limit_mb}M --pipe --wait"
options="-p TimeoutStopSec=10s -p MemoryMax=${memory_limit_mb}M --pipe --wait"
# Note: BindsTo will kill this task when the box is stopped. but will not kill this task when restarted!
# For this reason, we have code to kill the tasks both on shutdown and startup.