Last active
July 8, 2016 09:11
-
-
Save ety001/9ae81ca8d46b95b53d86f478c01115b8 to your computer and use it in GitHub Desktop.
90-dnspod.sh
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 characters
| #!/bin/sh | |
| [ "$ACTION" = ifup ] || exit 0 | |
| [ "$INTERFACE" = wan ] || exit 0 | |
| ipaddr=$(ifconfig pppoe-wan | grep inet | awk '{print $2}' | cut -c 6-) | |
| logger $ipaddr | |
| param='login_token=TOKEN&format=json&domain_id=29668&record_id=192014&sub_domain=sip&value='${ipaddr}'&record_type=A&record_line=默认' | |
| curl -X POST https://dnsapi.cn/Record.Modify -d $param |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment