Skip to content

Commit

Permalink
Fix for better vhost matching
Browse files Browse the repository at this point in the history
  • Loading branch information
serghey-rodin committed May 12, 2014
1 parent 9087a5b commit ef9f28e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions func/domain.sh
Expand Up @@ -254,7 +254,7 @@ add_web_config() {

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

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

Expand Down

0 comments on commit ef9f28e

Please sign in to comment.