本帖最后由 天龙山人 于 2017-9-11 19:57 编辑
1. 下载脚本 cloudxns: wget https://raw.githubusercontent.com/xdtianyu/scripts/master/ddns/cloudxns.shwget https://raw.githubusercontent.com/xdtianyu/scripts/master/ddns/cloudxns.confchmod +x cloudxns.shdnspod: wget https://raw.githubusercontent.com/xdtianyu/scripts/master/ddns/dnspod.sh
wget https://raw.githubusercontent.com/xdtianyu/scripts/master/ddns/dnspod.conf
chmod +x dnspod.sh2. 配置 cloudxns: API_KEY="YOUR_API_KEY"SECRET_KEY="YOUR_SECRET_KEY"DOMAIN="example.com"HOST="ddns"LAST_IP_FILE="/tmp/.LAST_IP"dnspod: ACCOUNT="xxxxxx@gmail.com"PASSWORD="xxxxxxxxxx"DOMAIN="xxxx.xxx.org"RECORD_LINE="默认"3. 运行测试 dnspod: ./dnspod.sh dnspod.conf cloudxns: ./cloudxns.sh cloudxns.conf 4. 添加到 cron 定时任务 /etc/init.d/cron enablecrontab -e添加如下内容,注意修改路径 cloudxns: */3 * * * * /root/ddns/cloudxns.sh /root/ddns/cloudxns.conf >> /root/ddns/cloudxns.logdnspod: */3 * * * * /root/ddns/dnspod.sh /root/ddns/dnspod.conf >> /root/ddns/dnspod.log
|