echo "Without sufficient swap space, your site may not work properly, and future"
echo "upgrades of Discourse may not complete successfully."
echo
- read -p "ENTER to create a 2GB swapfile automatically, or Ctrl-C to exit"
+ read -p "ENTER to create a 2GB swapfile now (you will need to be root), or Ctrl-C to exit"
##
## derived from https://meta.discourse.org/t/13880
mkswap /swapfile
swapon /swapfile
echo "/swapfile swap swap auto 0 0" | sudo tee -a /etc/fstab
- sudo sysctl -w vm.swappiness=10
+ sysctl -w vm.swappiness=10
echo vm.swappiness = 10 | sudo tee -a /etc/sysctl.conf
total_swap="$(LANG=C free -m | grep ^Swap: | awk '{print $2}')"