Skip to content

Commit ef9f28e

Browse files
committed
Fix for better vhost matching
1 parent 9087a5b commit ef9f28e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

func/domain.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ add_web_config() {
254254

255255
# Get config top and bottom line numbers
256256
get_web_config_brds() {
257-
serv_line=$(grep -ni 'Name %domain_idn%' "$tpl_file" |cut -f 1 -d :)
257+
serv_line=$(egrep -ni "Name %domain_idn%($| )" $tpl_file |cut -f 1 -d :)
258258
if [ -z "$serv_line" ]; then
259259
log_event "$E_PARSING" "$EVENT"
260260
return $E_PARSING
@@ -264,7 +264,7 @@ get_web_config_brds() {
264264
bfr_line=$((serv_line - 1))
265265
aftr_line=$((last_line - serv_line - 1))
266266

267-
str=$(grep -ni "Name $domain_idn" $conf | cut -f 1 -d :)
267+
str=$(egrep -ni "Name $domain_idn($| )" $conf | cut -f 1 -d :)
268268
top_line=$((str - serv_line + 1))
269269
bottom_line=$((top_line + last_line -1))
270270

0 commit comments

Comments
 (0)