Skip to content

xkatld/cloudflare-ddns

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 

Repository files navigation

使用说明

环境:Alpine3.20

下载脚本编辑一下加到crontab里就完事了

apk add jq curl
wget https://raw.githubusercontent.com/xkatld/cloudflare-ddns/main/cfddns.sh -O /usr/local/bin/cfddns.sh
chmod +x /usr/local/bin/cfddns.sh
vi /usr/local/bin/cfddns.sh

修改# 定义默认变量运行即可定时命令即可

(crontab -l 2>/dev/null; echo "*/5 * * * * /usr/local/bin/cfddns.sh >> /var/log/cfddns.log 2>&1") | crontab -

也可以通过自定义参数命令运行

/usr/local/bin/cfddns.sh -k <apikey> -e <邮箱> -z <域名> -h <二级域名> -t A -x true

出现缓存错误可以通过下面命令清理缓存

rm -rf ~/.cf/

About

cloudflare 一键 ddns 脚本 (大陆可用)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%