This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/sh | |
if [ -f /swapfile ]; then | |
echo "Swap file already exists." | |
else | |
dd if=/dev/zero of=/swapfile bs=1024k count=2000 | |
chmod 600 /swapfile | |
mkswap /swapfile | |
swapon /swapfile |