Protect the updater service from the oom killer

Fixes #576
This commit is contained in:
Girish Ramakrishnan
2019-01-08 10:49:55 -08:00
parent 85ea9b3255
commit 1affb2517a

View File

@@ -43,7 +43,7 @@ else
echo "=> starting service (ubuntu 16.04) ${UPDATER_SERVICE}. see logs using journalctl -u ${UPDATER_SERVICE}"
fi
if ! systemd-run --unit "${UPDATER_SERVICE}" $update_service_options ${installer_path}; then
if ! systemd-run --property=OOMScoreAdjust=-1000 --unit "${UPDATER_SERVICE}" $update_service_options ${installer_path}; then
echo "Failed to install cloudron. See log for details"
exit 1
fi