updated subst for SSL certificate snippet

This commit is contained in:
Asif Bacchus 2019-01-05 04:42:30 -07:00
parent 5a428c027f
commit 65238832c8
2 changed files with 6 additions and 5 deletions

View File

@ -12,7 +12,7 @@
-1,
-1,
-1,
524
532
]
}
]

View File

@ -42,6 +42,7 @@ tag_servernames="<server name(s)>"
file_servernames="nginx/snippets/server_names.conf"
tag_sslcert="<path/to/your_ssl_certificate_fullchain>"
tag_sslkey="<path/to/your_certificate_private_key.key>"
file_ssl="nginx/snippets/ssl/ssl_certs.conf"
tag_dhparam="<path/to/your_dhparam.pem>"
tag_cachain="<path/to/your_CA_bundle.crt>"
@ -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"