Files
linuxkit/alpine/packages/oom/etc/init.d/oom
2016-04-26 16:00:36 +01:00

22 lines
318 B
Plaintext
Executable File

#!/sbin/openrc-run
description="oom killer settings"
depend()
{
after docker
}
start()
{
ebegin "Adjusting oom killer settings"
for f in $(find /run -name '*.pid')
do
PID=$(cat $f)
[ -f /proc/$PID/oom_score_adj ] && echo "-800" > /proc/$PID/oom_score_adj
done
eend $? "Failed to adjust oom settings"
}