remove various 18.04 specific code
This commit is contained in:
@@ -30,7 +30,6 @@ readonly service_name="box-task-${task_id}"
|
||||
systemctl reset-failed "${service_name}" 2>/dev/null || true
|
||||
|
||||
readonly id=$(id -u $SUDO_USER)
|
||||
readonly ubuntu_version=$(lsb_release -rs)
|
||||
|
||||
options="-p TimeoutStopSec=10s -p MemoryMax=${memory_limit_mb}M -p OOMScoreAdjust=${oom_score_adjust} --pipe --wait"
|
||||
|
||||
@@ -38,11 +37,6 @@ options="-p TimeoutStopSec=10s -p MemoryMax=${memory_limit_mb}M -p OOMScoreAdjus
|
||||
# For this reason, we have code to kill the tasks both on shutdown and startup.
|
||||
[[ "$BOX_ENV" == "cloudron" ]] && options="${options} -p BindsTo=box.service"
|
||||
|
||||
# systemd 237 on ubuntu 18.04 does not apply --nice
|
||||
if [[ "${ubuntu_version}" == "18.04" ]]; then
|
||||
(sleep 1; pid=$(systemctl show "${service_name}" -p MainPID | sed 's/MainPID=//g'); renice -n ${nice} -g ${pid} || true) &
|
||||
fi
|
||||
|
||||
# DEBUG has to be hardcoded because it is not set in the tests. --setenv is required for ubuntu 16 (-E does not work)
|
||||
# NODE_OPTIONS is used because env -S does not work in ubuntu 16/18.
|
||||
# it seems systemd-run does not return the exit status of the process despite --wait
|
||||
|
||||
Reference in New Issue
Block a user