fix: correct invoke aws cli for aws ddns
This commit is contained in:
parent
d3a4db811d
commit
c4084f9925
@ -1,4 +1,6 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash -eu
|
||||
|
||||
set -o pipefail
|
||||
|
||||
HOSTED_ZONE_ID="/hostedzone/Z00026583L98XLGPBWMM8"
|
||||
|
||||
@ -28,7 +30,7 @@ echo \
|
||||
"Issuing command:
|
||||
aws route53 change-resource-record-sets --hosted-zone-id ${HOSTED_ZONE_ID} --change-batch json-data-update(see script)"
|
||||
|
||||
result="$(aws route53 change-resource-record-sets --hosted-zone-id "${HOSTED_ZONE_ID}" --change-batch "${resource_update}")"
|
||||
result="$(aws --no-cli-auto-prompt route53 change-resource-record-sets --hosted-zone-id "${HOSTED_ZONE_ID}" --change-batch "${resource_update}")"
|
||||
echo \
|
||||
"Current Record Status:
|
||||
$(jq '.ChangeInfo.Status' <(echo "${result}"))"
|
||||
@ -36,4 +38,4 @@ echo \
|
||||
current_time="$(date +%Y-%m-%dT%H:%M:%S)"
|
||||
cat << EOF >> DDNS_Updates.log
|
||||
DDNS Update made @ ${current_time}
|
||||
EOF
|
||||
EOF
|
||||
|
Loading…
Reference in New Issue
Block a user