From 72a7bdf04af5198c68997d459303cc5d72e88b50 Mon Sep 17 00:00:00 2001 From: Andrew Schleifer Date: Wed, 26 Jun 2019 14:24:46 +0800 Subject: [PATCH] fallocate swapfile instead of dd --- discourse-setup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discourse-setup b/discourse-setup index c4f263b..69e6f58 100755 --- a/discourse-setup +++ b/discourse-setup @@ -139,7 +139,7 @@ check_disk_and_memory() { ## derived from https://meta.discourse.org/t/13880 ## install -o root -g root -m 0600 /dev/null /swapfile - dd if=/dev/zero of=/swapfile bs=1k count=2048k + fallocate -l 2G /swapfile mkswap /swapfile swapon /swapfile echo "/swapfile swap swap auto 0 0" | tee -a /etc/fstab -- 2.25.1