wagon/back/lib/ns_update_send

14 lines
347 B
Bash
Executable File

#!/bin/bash
# FILE: wgapi:back/lib/ns/update/send
# DESCRIPTION: Send stuff to the nsupdate server
# USAGE: send cmd
# ERRORS:
# 3: Bad usage
# 4: Missing config file
CONFIG_FILE='/etc/wgapi/config'
[ -f "${CONFIG_FILE}" ] || exit 4
source "${CONFIG_FILE}"
printf "server ${DNS_MASTER}\n${1}\nsend\n" \
| nsupdate -y "${DNS_KEY}"