Merge pull request #140 from itoffshore/alpine

improve regex for root directive check
This commit is contained in:
Stuart Cardall 2018-02-26 23:00:17 +00:00 committed by GitHub
commit 7463373a24
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -401,7 +401,7 @@ main() {
# do not use wildcards in vhost files
printf "%-10s %-${col_size}s %s\n" "WARN:" "$BOTS_DIR/* detected" "=> $file"
else # do not add includes to vhosts without root directive (i.e redirects)
if grep -Ew [[:space:]]+root $file 1>/dev/null; then
if grep -Ew ^[[:space:]]+root $file 1>/dev/null; then
add_includes $line $file $BOTS_DIR $col_size $VHOST_INCLUDES
fi
fi