-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doesnt work with private zones #5
Comments
I think the text formatting ate some important punctuation. This is what worked for me: function find_zone() {
local DOMAIN="${1}"
local ZONELIST=$(cli53 list -format json | jq --raw-output '.[] | select(.Config.PrivateZone == false) | .Name, .Id' | sed -e 's/\.$//' | xargs echo -n | sed -e 's# /hostedzone/#|#g')
local TESTDOMAIN="${DOMAIN}"
local DOM=""
local ID=""
while [[ -n "$TESTDOMAIN" ]]; do
for zone in $ZONELIST; do
ID="${zone##*|}"
DOM="${zone%|*}"
if [[ "$DOM" == "$TESTDOMAIN" ]]; then
echo "$ID"
return 0
fi
done
TESTDOMAIN=$(get_base_name "$TESTDOMAIN")
done
return 1
} I also had to add |
Looks to have ate the *'s
Quoting Sven Edge ***@***.***>:
… I think the text formatting ate some important punctuation. This is
what worked for me:
```bash
function find_zone() {
local DOMAIN="${1}"
local ZONELIST=$(cli53 list -format json | jq --raw-output '.[] |
select(.Config.PrivateZone == false) | .Name, .Id' | sed -e
's/\.$//' | xargs echo -n | sed -e 's# /hostedzone/#|#g')
local TESTDOMAIN="${DOMAIN}"
local DOM=""
local ID=""
while [[ -n "$TESTDOMAIN" ]]; do
for zone in $ZONELIST; do
ID="${zone##*|}"
DOM="${zone%|*}"
if [[ "$DOM" == "$TESTDOMAIN" ]]; then
echo "$ID"
return 0
fi
done
TESTDOMAIN=$(get_base_name "$TESTDOMAIN")
done
return 1
}
```
I also had to add `export PATH="$PATH:/usr/local/bin"` as that's
where cli53 is.
--
Reply to this email directly or view it on GitHub:
#5 (comment)
You are receiving this because you authored the thread.
Message ID:
***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
simple modifications to work with private zones.
local ZONELIST=$(cli53 list -format json | jq --raw-output '.[] | select(.Config.PrivateZone == false) | .Name, .Id' | sed -e 's/.$//' | xargs echo -n | sed -e 's/ /hostedzone//|/g')
local TESTDOMAIN="${DOMAIN}"
local DOM=""
local ID=""
while [[ -n "$TESTDOMAIN" ]]; do
for zone in $ZONELIST; do
ID="${zone##|}"
DOM="${zone%|}"
if [[ "$DOM" == "$TESTDOMAIN" ]]; then
echo "$ID"
return 0
fi
done
TESTDOMAIN=$(get_base_name "$TESTDOMAIN")
done
The text was updated successfully, but these errors were encountered: