Add support for preventing OOM kill on certain VMs.
This commit is contained in:
@@ -38,6 +38,7 @@ fi
|
||||
: ${VNC_WIDTH:="1920"}
|
||||
: ${VNC_HEIGHT:="1080"}
|
||||
: ${BIND9P:=""}
|
||||
: ${PREVENT_OOM:="NO"}
|
||||
: "${CD:=}"
|
||||
|
||||
: ${SHUTDOWN_TIMEOUT:="600"} # 10 minutes
|
||||
@@ -278,6 +279,10 @@ function start_body {
|
||||
local mac_address
|
||||
mac_address=$(calculate_mac_address "$name")
|
||||
|
||||
if [ "$PREVENT_OOM" = "YES" ]; then
|
||||
protect -d -i -p "$$"
|
||||
fi
|
||||
|
||||
local additional_args=()
|
||||
|
||||
if [ "$NETWORK" = "NAT" ]; then
|
||||
|
||||
Reference in New Issue
Block a user