remove all matching selectors and all selctors followed by "-"
This commit is contained in:
@@ -64,7 +64,8 @@ name_resolver() {
|
|||||||
EXISTS=$(grep -w $D $HOST_FILE);
|
EXISTS=$(grep -w $D $HOST_FILE);
|
||||||
#EXISTS=$(grep -w "$D-" $HOST_FILE); # TODO?
|
#EXISTS=$(grep -w "$D-" $HOST_FILE); # TODO?
|
||||||
if [ -n "$EXISTS" ]; then # selector exists in hosts file
|
if [ -n "$EXISTS" ]; then # selector exists in hosts file
|
||||||
APP_IP=$(echo $EXISTS | sed s/$D//g); # remove all selectors
|
# remove all matching selectors and all selctors followed by "-"
|
||||||
|
APP_IP=$(echo $EXISTS | sed s/$D-//g | sed s/$D//g);
|
||||||
debug "APP_IP: "$APP_IP;
|
debug "APP_IP: "$APP_IP;
|
||||||
else
|
else
|
||||||
debug "no matching APPLICATION NAME found in $HOST_FILE"
|
debug "no matching APPLICATION NAME found in $HOST_FILE"
|
||||||
|
Reference in New Issue
Block a user