Skip to content

Commit

Permalink
Added flags to silence curl output
Browse files Browse the repository at this point in the history
  • Loading branch information
happytreees committed Aug 24, 2022
1 parent a10e364 commit 3409e46
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dns_scripts/dns_add_vultr
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if [[ -z "$VULTR_API_KEY" ]]; then
fi

function create {
curl "${api_url}/domains/$1/records" -X POST -H "Authorization: Bearer ${VULTR_API_KEY}" -H "Content-Type: application/json" \
curl "${api_url}/domains/$1/records" -s -o /dev/null -X POST -H "Authorization: Bearer ${VULTR_API_KEY}" -H "Content-Type: application/json" \
--data "{
\"name\" : \"$2\",
\"type\" : \"TXT\",
Expand Down
2 changes: 1 addition & 1 deletion dns_scripts/dns_del_vultr
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if [[ -z "$VULTR_API_KEY" ]]; then
fi

function delete {
recordID=$(curl "${api_url}/domains/$1/records" -X GET -H "Authorization: Bearer ${VULTR_API_KEY}" | jq -r ".records[] | select(.name==\"$2\").id")
recordID=$(curl "${api_url}/domains/$1/records" --silent -X GET -H "Authorization: Bearer ${VULTR_API_KEY}" | jq -r ".records[] | select(.name==\"$2\").id")

curl "${api_url}/domains/$1/records/$recordID" -X DELETE -H "Authorization: Bearer ${VULTR_API_KEY}"
}
Expand Down

0 comments on commit 3409e46

Please sign in to comment.