Blame SOURCES/azure-cloud.sh

fad460
#!/bin/sh
fad460
#
fad460
# This script provides support for dynamic DNS update in Microsoft Azure
fad460
# cloud. To enable this feature, change the configuration variables below
fad460
# and make the script executable.
fad460
fad460
primary_interface="eth0"
fad460
required_domain="mydomain.local"
fad460
dns_server="my-dns-server.mydomain.local"
fad460
fad460
# change the configuration variables above
fad460
fad460
[ "$interface" == "$primary_interface" ] || exit
fad460
fad460
case "$reason" in
fad460
BOUND|RENEW|REBIND|REBOOT)
fad460
    fqdn="`hostname`.$required_domain"
fad460
    nsupdate <
fad460
server $dns_server
fad460
update delete $fqdn a
fad460
update add $fqdn 3600 a $new_ip_address
fad460
send
fad460
EOF
fad460
    ;;
fad460
esac