From: Guo Xiang Tan Date: Tue, 2 Apr 2019 08:05:00 +0000 (+0800) Subject: Add missing lines due to bad commit in 40fd876d1edb1a376a4eb592c9de4a178352a760. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=f15044ddb2af64afa0f3afd9d9370580f148d4dc;p=discourse_docker.git Add missing lines due to bad commit in 40fd876d1edb1a376a4eb592c9de4a178352a760. --- diff --git a/templates/web.letsencrypt.ssl.template.yml b/templates/web.letsencrypt.ssl.template.yml index 463f04e..4f46ccb 100644 --- a/templates/web.letsencrypt.ssl.template.yml +++ b/templates/web.letsencrypt.ssl.template.yml @@ -62,7 +62,7 @@ hooks: # Try to issue the cert again if something goes wrong LE_WORKING_DIR="${LETSENCRYPT_DIR}" $$ENV_LETSENCRYPT_DIR/acme.sh --issue -d $$ENV_DISCOURSE_HOSTNAME -k 4096 --force -w /var/www/discourse/public else - echo "force_https = 'true'" >> "/var/www/discourse/config/discourse.conf" + grep -q 'force_https' "/var/www/discourse/config/discourse.conf" || echo "force_https = 'true'" >> "/var/www/discourse/config/discourse.conf" fi LE_WORKING_DIR="${LETSENCRYPT_DIR}" $$ENV_LETSENCRYPT_DIR/acme.sh --installcert -d $$ENV_DISCOURSE_HOSTNAME --fullchainpath /shared/ssl/$$ENV_DISCOURSE_HOSTNAME.cer --keypath /shared/ssl/$$ENV_DISCOURSE_HOSTNAME.key --reloadcmd "sv reload nginx"