From 7802f6799a553abb86f173d6cc9ea7e26cbb9235 Mon Sep 17 00:00:00 2001 From: Jeff Atwood Date: Tue, 10 May 2016 02:10:06 -0700 Subject: [PATCH] sudo command redundant on swapfile create --- discourse-setup | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/discourse-setup b/discourse-setup index 935167a..268fa03 100755 --- a/discourse-setup +++ b/discourse-setup @@ -24,7 +24,7 @@ check_disk_and_memory() { 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 @@ -34,7 +34,7 @@ check_disk_and_memory() { 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}')" -- 2.25.1