Files
linux_tools/sbin/swap-increase
2021-01-22 10:13:40 -05:00

14 lines
227 B
Bash
Executable File

#!/bin/sh
if [ -f /swapfile ]; then
echo "Increasing /swapfile size"
swapoff /swapfile
rm /swapfile
fallocate -l 16G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
else
echo "No /swapfile!"
fi