Browse Source

Adjust apache2 config line in egrep.

(cherry picked from commit a72d22250ea933cf6209b4325e143696511011e6)
Raphael Schneeberger 6 years ago
parent
commit
5036df84ab
1 changed files with 3 additions and 3 deletions
  1. 3 3
      bin/v-add-letsencrypt-domain

+ 3 - 3
bin/v-add-letsencrypt-domain

@@ -254,9 +254,9 @@ for auth in $authz; do
                 # Get root directory from configuration
                 domain_config="$HOMEDIR/$user/conf/web/$domain"
                 if [ -f "$domain_config/apache2.conf" ]; then
-                    well_known="$(cat $domain_config/apache2.conf | egrep '^\s+root'| \
-                                awk '{split($0, a, " "); print a[2]}' | \
-                                sed 's/;$//')/.well-known"
+                    well_known="$(cat $domain_config/apache2.conf | egrep \
+                                '^\s+DocumentRoot'| awk '{split($0, a, " "); \
+                                print a[2]}')/.well-known"
                 else
                     well_known="$(cat $domain_config/nginx.conf | egrep '^\s+root'| \
                                 awk '{split($0, a, " "); print a[2]}' | \