evoacme: fix nginx ssl_certificate replacement

This commit is contained in:
Victor LABORIE 2017-03-15 17:32:52 +01:00
parent 5751f18d02
commit 25bdddbd92

View file

@ -49,7 +49,7 @@ if [ $? == 0 ]; then
fi
which nginx>/dev/null
if [ $? == 0 ]; then
[ -f /etc/nginx/ssl/${vhost}.conf ] && sed -i "s~^ssl_certificate[^_]*$~ssl_certificate $CRT_DIR/${vhost}-fullchain.pem;~" /etc/nginx/ssl/${vhost}.conf
[ -f /etc/nginx/ssl/${vhost}.conf ] && sed -i "s~^ssl_certificate[^_].*$~ssl_certificate $CRT_DIR/${vhost}-fullchain.pem;~" /etc/nginx/ssl/${vhost}.conf
nginx -t 2>/dev/null
if [ $? == 0 ]; then
service nginx reload