# perl_dnspod_ddns **Repository Path**: fy138/perl_dnspod_ddns ## Basic Information - **Project Name**: perl_dnspod_ddns - **Description**: 通过perl DNSPOD API写了一个动态记录更新脚本,当前已经稳定运行 - **Primary Language**: Perl - **License**: GPL-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2015-01-20 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: web-dev-toolkits **Tags**: None ## README ###作者:http://www.yiyou.org/ # dnspod_ddns ###DNSPOD API & DDNS script ####这是DNSPOD perl API与ddns.pl更新脚本 ###安装方法: ###1、执行 ``` git clone https://git.oschina.net/fy138/perl_dnspod_ddns.git cd dnspod_ddns chmod +x *.pl ``` ###2、 执行 ``` ./require.pl ``` 安装缺少的perl 模块 新系统需要安装gcc,openssl-devel,make ###3、在 ddns.pl 里编辑你的帐号信息 ``` my $domain = 'yiyou.org'; #域名 my $sub_domain = 'home'; #子域名 my $email = 'your_email@here.com'; #dnspod 帐号 my $password = 'your_password'; #dnspod 密码 ``` ####到此,你可以执行./ddns.pl这个程序来试试是否更新成功IP地址了。(往下看日志文件位置) ###4、执行 ``` ./daemond.pl ``` ####(如果你用crontab 则不需要执行这个文件,直接把./ddns.pl 放入crontab 就可以了。) ####使用./daemond.pl可以省去你配置crontab的麻烦。 ####它可以将ddns.pl这个脚本变成进程,每60秒执行一次检查,当你修改代码时,要注意先停止,再启动,命令看下面。 ###相关命令: ``` shell#./daemond.pl start shell#./daemond.pl status shell#./daemond.pl stop shell#./daemond.pl restart ``` ###启动进程后,会在本地目录生成 log 和pid文件 ####log文件 /var/log/dnspod_ddns.log #####pid文件 /var/run/dnspod_ddns.pid ###5、把/path/to/daemond.pl加入/etc/rc.local 让它随系统启动