add user_oom_killer
This commit is contained in:
parent
edbe0279bc
commit
24e52ef513
1
files/earlyoom.conf
Normal file
1
files/earlyoom.conf
Normal file
@ -0,0 +1 @@
|
|||||||
|
EARLYOOM_ARGS="-m 6 -s 6"
|
||||||
11
init_priv.sh
11
init_priv.sh
@ -184,6 +184,16 @@ configure_boot_info() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
configure_user_oom_killer() {
|
||||||
|
[ -f /etc/default/earlyoom ] && return
|
||||||
|
|
||||||
|
if confirm_action "要启用 earlyoom 吗?" "Y"; then
|
||||||
|
sudo apt install earlyoom -y
|
||||||
|
sudo cat $scriptdir/files/earlyoom.conf | sudo tee /etc/default/earlyoom >/dev/null
|
||||||
|
sudo systemctl restart earlyoom
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# ============================================================
|
# ============================================================
|
||||||
|
|
||||||
configure_tuna
|
configure_tuna
|
||||||
@ -199,3 +209,4 @@ configure_iptables
|
|||||||
configure_hostname
|
configure_hostname
|
||||||
configure_timedate
|
configure_timedate
|
||||||
configure_boot_info
|
configure_boot_info
|
||||||
|
configure_user_oom_killer
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user