diff --git a/AWS/DDNS.bash b/AWS/DDNS.bash index fd89f18..dec8edd 100755 --- a/AWS/DDNS.bash +++ b/AWS/DDNS.bash @@ -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 \ No newline at end of file +EOF