Skip to content

Commit

Permalink
rsdns-did use standard function
Browse files Browse the repository at this point in the history
  • Loading branch information
linickx committed May 5, 2016
1 parent 35a2c57 commit bb50a26
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
7 changes: 5 additions & 2 deletions lib/func.sh
Expand Up @@ -168,8 +168,11 @@ function get_domain() {

function delete_record() {

get_recordid

if [ -z $RECORDID ]
then
get_recordid
fi

RC=`curl -k -s -X DELETE -D - -H X-Auth-Token:\ $TOKEN -H Content-Type:\ application/json -H Accept:\ application/json $DNSSVR/$USERID/domains/$DOMAINID/records/$RECORDID|tr -s '[:cntrl:]' "\n"`

if [[ $QUIET -eq 0 ]]; then
Expand Down
6 changes: 1 addition & 5 deletions rsdns-did.sh
Expand Up @@ -89,11 +89,7 @@ fi
# get the domain ID :)
check_domain

RC=`curl -k -s -X DELETE -D - -H X-Auth-Token:\ $TOKEN -H Content-Type:\ application/json -H Accept:\ application/json $DNSSVR/$USERID/domains/$DOMAINID/records/$RECORDID|tr -s '[:cntrl:]' "\n"`

if [[ $QUIET -eq 0 ]]; then
echo $RC
fi
delete_record

#done
exit 0

0 comments on commit bb50a26

Please sign in to comment.