Skip to content
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

Fix for API change #8

wants to merge 8 commits into
base: master
@@ -300,20 +300,20 @@ function deleteRecord {
# See whether there is already a record for this domain

local LIST_RESP=`submitApiRequest $KEY dns-list_records type=A\&editable=1`

echo "$LIST_RESP results"
if [ $? -ne 0 ]; then
logStatus "notice" "Error Listing Records: $LIST_RESP"
return 1

local CURRENT_RECORD=`printf "$LIST_RESP" | grep "\s$RECORD\sA"`

local CURRENT_RECORD=`echo $LIST_RESP | egrep -o "$RECORD A [0-9]{3}.[0-9]{2}.[0-9]{2}.[0-9]{3}"`
echo "$CURRENT_RECORD results"
if [ $? -ne 0 ]; then
logStatus "error" "Record not found"
return 0

local OLD_VALUE=`printf "$CURRENT_RECORD" | awk '{print $5 }'`
local OLD_VALUE=`echo $CURRENT_RECORD | awk '{print $3 }'`

if [ "$OLD_VALUE" == "$NEW_VALUE" ]; then
# The current record is up to date, so we don't need to do anything
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.