Merge pull request #16 from ollien/fix-comments

Avoid extracting comments when parsing domain names
This commit is contained in:
Elliot Saba 2020-01-08 18:13:24 -08:00 committed by GitHub
commit 386d73143b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -16,7 +16,7 @@ error() {
parse_domains() { parse_domains() {
# For each configuration file in /etc/nginx/conf.d/*.conf* # For each configuration file in /etc/nginx/conf.d/*.conf*
for conf_file in /etc/nginx/conf.d/*.conf*; do for conf_file in /etc/nginx/conf.d/*.conf*; do
sed -n -e 's&^\s*ssl_certificate_key\s*\/etc/letsencrypt/live/\(.*\)/privkey.pem;&\1&p' $conf_file | xargs echo sed -n -r -e 's&^\s*ssl_certificate_key\s*\/etc/letsencrypt/live/(.*)/privkey.pem;\s*(#.*)?$&\1&p' $conf_file | xargs echo
done done
} }