From: Jay Pfaffman Date: Wed, 20 Apr 2016 18:34:09 +0000 (-0500) Subject: Make change/unchange language clearer X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=5918c35bb2be40d5d454ecf9ab897776a71b49f2;p=discourse_docker.git Make change/unchange language clearer --- 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 }