From b176fa82c4579dd6530265b73e96a9681e2a2826 Mon Sep 17 00:00:00 2001 From: Nick Krichevsky Date: Sun, 29 Dec 2019 23:40:46 -0500 Subject: [PATCH] Avoid extracting comments when parsing domain names --- src/scripts/util.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripts/util.sh b/src/scripts/util.sh index 8f0d5bb..00d576b 100644 --- a/src/scripts/util.sh +++ b/src/scripts/util.sh @@ -16,7 +16,7 @@ error() { parse_domains() { # For each configuration file in /etc/nginx/conf.d/*.conf* 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 }