cpsetup
cpsetup copied to clipboard
Add create swapfile option
Check for swap file
The server appears to have no swap file. This is usually considered a stability and performance risk. You should either add a swap partition, or create one via a normal file on an existing partition
dd if=/dev/zero of=/swapfile bs=$SWAPFILE_SIZE count=524288
chown root:root /swapfile
chmod 0600 /swapfile
mkswap /swapfile
swapon /swapfile
echo "/swapfile none swap sw 0 0" >> /etc/fstab
I'm certainly open to a PR to add this to the script