Add TimeoutStopSec=10s for systemctl kill to work faster
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user