This file contains 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 | |
# Creates a 1gb swap image. | |
# @see https://www.digitalocean.com/community/tutorials/how-to-configure-virtual-memory-swap-file-on-a-vps | |
if [ -f /var/swap.img ]; then | |
echo "Swap file already exists." | |
else | |
touch /var/swap.img | |
chmod 600 /var/swap.img |