mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[enh] Configure swappiness
This commit is contained in:
parent
38fc88dcbe
commit
beff899e5f
1 changed files with 7 additions and 0 deletions
|
@ -130,6 +130,13 @@ ynh_add_swap () {
|
|||
return
|
||||
fi
|
||||
|
||||
# Configure swappiness
|
||||
if [ ! -e /etc/sysctl.d/999-ynhswap.conf ]
|
||||
then
|
||||
echo "vm.swappiness=10" > /etc/sysctl.d/999-ynhswap.conf
|
||||
sysctl --quiet --system
|
||||
fi
|
||||
|
||||
# Compare the available space with the size of the swap.
|
||||
# And set a acceptable size from the request
|
||||
if [ $usable_space -ge $swap_max_size ]
|
||||
|
|
Loading…
Add table
Reference in a new issue