From 65238832c823be41ffd1ee9ad8ef09a7dfa31859 Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Sat, 5 Jan 2019 04:42:30 -0700 Subject: [PATCH] updated subst for SSL certificate snippet --- .vscode/numbered-bookmarks.json | 2 +- setup.sh | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.vscode/numbered-bookmarks.json b/.vscode/numbered-bookmarks.json index f705b63..fff2b18 100644 --- a/.vscode/numbered-bookmarks.json +++ b/.vscode/numbered-bookmarks.json @@ -12,7 +12,7 @@ -1, -1, -1, - 524 + 532 ] } ] diff --git a/setup.sh b/setup.sh index 937a23e..a2b3a94 100644 --- a/setup.sh +++ b/setup.sh @@ -42,6 +42,7 @@ tag_servernames="" file_servernames="nginx/snippets/server_names.conf" tag_sslcert="" tag_sslkey="" +file_ssl="nginx/snippets/ssl/ssl_certs.conf" tag_dhparam="" tag_cachain="" @@ -522,7 +523,7 @@ echo -e "${warn}${configPath}${norm}\n" rm -rf "${configPath}" cp -R ./etc "${configPath}" -# process server names +# process server_names snippet echo -e "updating ${warn}${configPath}/${file_servernames}${norm}" for name in "${serverNames[@]}"; do sed -i "/${tag_servernames}/a \ \ ${name}" "${configPath}/${file_servernames}" @@ -530,9 +531,9 @@ done sed -i "/${tag_servernames}/d" "${configPath}/${file_servernames}" # process SSL snippet -echo "updating SSL paths in snippet file" -sed -e "s%${tag_sslcert}%${CertPath}%" "${configPath}/nginx/snippets/ssl/ssl_certs.conf" -sed -e "s%${tag_sslkey}%${KeyPath}%" "${configPath}/nginx/snippets/ssl/ssl_certs.conf" +echo "updating ${warn}${configPath}/${file_ssl}${norm}" +sed -i -e "s%${tag_sslcert}%${CertPath}%" "${configPath}/${file_ssl}" +sed -i -e "s%${tag_sslkey}%${KeyPath}%" "${configPath}/${file_ssl}" # process mozModern SSL configuration echo "updating SSL configuration parameters file"