#!/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"
}
