From 5918c35bb2be40d5d454ecf9ab897776a71b49f2 Mon Sep 17 00:00:00 2001 From: Jay Pfaffman Date: Wed, 20 Apr 2016 13:34:09 -0500 Subject: [PATCH] Make change/unchange language clearer --- launcher | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/launcher b/launcher index cb0bef0..b0b9670 100755 --- a/launcher +++ b/launcher @@ -491,14 +491,18 @@ run_memconfig(){ else db_shared_buffers=`expr $avail_gb \* 256` fi - echo -e "Setting db_shared_buffers to ${db_shared_buffers}GB\c" + echo -e "Recommend setting for db_shared_buffers: ${db_shared_buffers}GB" sed -i -e "s/^ #db_shared_buffers:.*/ db_shared_buffers: \"${db_shared_buffers}GB\"/w $changelog" $config_file if [ -s $changelog ] then - echo " successfully." + echo "db_shared_buffers set successfully." rm $changelog - else - echo -e ". . . oops!\n---> db_shared_buffers not found in $config_file." + else if grep "^ db_shared_buffers:" $config_file + then + echo "db_shared_buffers already set. Unchanged." + else + echo -e ". . . oops!\n---> db_shared_buffers not found in $config_file." + fi fi # set UNICORN_WORKERS: 2*GB or 2*cores (the same on DO) @@ -509,14 +513,18 @@ run_memconfig(){ unicorn_workers=`expr $avail_cores \* 2` fi - echo -e "Setting UNICORN_WORKERS to $unicorn_workers\c" + echo -e "Recommended setting UNICORN_WORKERS: $unicorn_workers" sed -i -e "s/^ #UNICORN_WORKERS:.*/ UNICORN_WORKERS: ${unicorn_workers}/w $changelog" $config_file if [ -s $changelog ] then - echo " successfully." + echo "UNICORN_WORKERS set successfully." rm $changelog - else - echo -e ". . . oops!\n---> UNICORN_WORKERS not found in $config_file.\n" + else if grep "^ UNICORN_WORKERS:" $config_file + then + echo "UNICORN_WORKERS already set. Unchanged." + else + echo -e ". . . oops!\n---> UNICORN_WORKERS not found in $config_file.\n" + fi fi } -- 2.25.1