Improve check_wildcard() regex

Was detecting a commented out #/etc/nginx/conf.d/* as existing and therefore not doing required blocker includes
This commit is contained in:
Mitchell Krog 2019-07-03 15:25:20 +02:00
parent c2131f6579
commit 08fce8e496
No known key found for this signature in database
GPG key ID: C243C388553EDE5D

View file

@ -175,7 +175,7 @@ longest_str() {
check_wildcard() {
local file=$1 dir=$(basename $2)
local check="$(grep -E "include[[:alnum:] /]+$dir/\*" $file)"
local check="$(grep -E "^[^#]+include[[:alnum:] /]+$dir/\*" $file)"
echo $check
}