Blame SOURCES/azure-cloud.sh

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