removed sed replace when looking for dns
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
FROM minimal:2.35
|
FROM alpine
|
||||||
MAINTAINER gyurix
|
|
||||||
|
RUN apk add --update --no-cache openssl jq curl ca-certificates busybox-extras
|
||||||
COPY entrypoint.sh /entrypoint.sh
|
COPY entrypoint.sh /entrypoint.sh
|
||||||
ENTRYPOINT ["/entrypoint.sh"]
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
|
@@ -71,7 +71,7 @@ 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
|
APP_IP=$(echo $EXISTS | awk '{print $1}'); # remove all selectors
|
||||||
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