Last active
September 12, 2021 12:31
Revisions
-
ahmpro revised this gist
Sep 24, 2015 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,6 +10,7 @@ # Get __TOKEN__: https://pddimp.yandex.ru/api2/admin/get_token # Get __RECORD_ID__: # curl -H 'PddToken: __TOKEN__' 'https://pddimp.yandex.ru/api2/admin/dns/list?domain=domain.com' # and find domain that you need in result, may use http://pro.jsonlint.com/ for pretty json :) # for more detail about Yandex API see https://tech.yandex.ru/pdd/doc/concepts/api-dns-docpage/ -
ahmpro revised this gist
Sep 24, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ #!/bin/bash # Author: ahmpro and community # gist url: https://gist.github.com/ahmpro/f1fceddf1ac62d60980d # Yandex dDNS(handmade Dynamic DNS) for OpenWrt # Tested on OpenWrt Chaos Calmer r46612, LuCI (git-15.216.69575-bb7ea3e) -
ahmpro created this gist
Sep 24, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,26 @@ #!/bin/bash # Author: ahmpro and community # gist url: # Yandex dDNS(handmade Dynamic DNS) for OpenWrt # Tested on OpenWrt Chaos Calmer r46612, LuCI (git-15.216.69575-bb7ea3e) # You should install curl (don't forget update packages list) # Get __TOKEN__: https://pddimp.yandex.ru/api2/admin/get_token # Get __RECORD_ID__: # curl -H 'PddToken: __TOKEN__' 'https://pddimp.yandex.ru/api2/admin/dns/list?domain=domain.com' # for more detail about Yandex API see https://tech.yandex.ru/pdd/doc/concepts/api-dns-docpage/ __TOKEN__=1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz __DOMAIN__=example.com __SUBDOMAIN__=home __RECORD_ID__=123456 __TTL__=14400 __IP__=$__IP # inner var from openwrt # as you know this script parsed inside send_update() of /usr/lib/ddns/dynamic_dns_functions.sh # if you don't know that see http://wiki.openwrt.org/doc/uci/ddns write_log 7 "curl -H 'PddToken: \$__TOKEN__' -d 'domain=$__DOMAIN__&subdomain=$__SUBDOMAIN__&record_id=$__RECORD_ID__&ttl=$__TTL__&content=$__IP__' 'https://pddimp.yandex.ru/api2/admin/dns/edit' -vk" write_log 7 `curl -H "PddToken: $__TOKEN__" -d "domain=$__DOMAIN__&subdomain=$__SUBDOMAIN__&record_id=$__RECORD_ID__&ttl=$__TTL__&content=$__IP__" "https://pddimp.yandex.ru/api2/admin/dns/edit" -vk`