Browse Source

Added flags to silence curl output

pull/774/head
ErwinsExpertise 3 years ago
parent
commit
3409e46ce0
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      dns_scripts/dns_add_vultr
  2. +1
    -1
      dns_scripts/dns_del_vultr

+ 1
- 1
dns_scripts/dns_add_vultr View File

@ -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\",


+ 1
- 1
dns_scripts/dns_del_vultr View File

@ -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}"
}


Loading…
Cancel
Save