removed sed replace when looking for dns

This commit is contained in:
2024-09-09 14:33:17 +02:00
parent 4a565f7ff6
commit 2ffee57863
2 changed files with 4 additions and 3 deletions

View File

@@ -1,4 +1,5 @@
FROM minimal:2.35
MAINTAINER gyurix
FROM alpine
RUN apk add --update --no-cache openssl jq curl ca-certificates busybox-extras
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]

View File

@@ -71,7 +71,7 @@ name_resolver() {
EXISTS=$(grep -w $D $HOST_FILE);
#EXISTS=$(grep -w "$D-" $HOST_FILE); # TODO?
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;
else
debug "no matching APPLICATION NAME found in $HOST_FILE"