gluon-core: force kernel panic on out of memory

In combination with kernel.panic the node will reboot if out of memory.
This commit is contained in:
Daniel Ehlers 2014-02-17 23:23:29 +01:00
parent c2adf36e20
commit 6f302fc8df
2 changed files with 9 additions and 0 deletions

View File

@ -0,0 +1,4 @@
sysctl_set() {
sed -i "/^${1//./\.}=/d" /etc/sysctl.conf
echo "${1}=$2" >> /etc/sysctl.conf
}

View File

@ -0,0 +1,5 @@
#!/bin/sh
. /lib/gluon/functions/sysctl.sh
sysctl_set vm.panic_on_oom 1