- 新刷写的系统没有git 下载git
sudo apt update && apt install git -y
- cloudflare ddns的git库地址:https://github.com/K0p1-Git/cloudflare-ddns-updaterCloudflare Dynamic DNS IP Updater script. Contribute to K0p1-Git/cloudflare-ddns-updater development by creating an account on GitHub.https://github.com/K0p1-Git/cloudflare-ddns-updater
3.下载工具包
git clone https://github.com/K0p1-Git/cloudflare-ddns-updater
4.cd进软件包目录下,把实例文件复制一个出来,
cp cloudflare-template.sh cloudflare.sh
5.用nano编辑cloudflare.sh
nano cloudflare.sh
6.输入自己的cloudflare登录邮箱 global token…..
chmod +x cloudflare.sh
7.最后测试一下是否运行成功 ./cloudflare.sh
如果成功的话cloudflare里的ip会变成你的公网ip
8.设置树莓派定时任务
crontab -e
格式:分钟,小时,日,月,周几,文件路径
PS(pwd指令查看当前目录地址 ctrl+z切到外面 fg指令继续编辑)
原文链接:https://blog.csdn.net/Vanish_Lin/article/details/123108721?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522168449620216800188544320%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fblog.%2522%257D&request_id=168449620216800188544320&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~blog~first_rank_ecpm_v1~times_rank-6-123108721-null-null.blog_rank_default&utm_term=NAS%E3%80%81%E7%BE%A4%E6%99%96%E3%80%81%E9%98%BF%E9%87%8C%E4%BA%91%E3%80%81%E5%9F%9F%E5%90%8D%E8%A7%A3%E6%9E%90%E3%80%81%E5%86%85%E7%BD%91%E7%A9%BF%E9%80%8F%E3%80%81ipv6%E3%80%81ddns%E3%80%81%E8%BD%BB%E9%87%8F%E7%BA%A7%E4%BA%91%E6%9C%8D%E5%8A%A1%E5%99%A8%E3%80%81%E9%93%81%E5%A8%81%E9%A9%AC%E3%80%81%E5%A8%81%E8%81%94%E9%80%9A%E3%80%81DSM%E3%80%81DSM6.0%E3%80%81%E7%BE%A4%E6%99%96nas%E3%80%81%E4%BA%91%E6%9C%8D%E5%8A%A1%E5%99%A8%E3%80%81%E8%9C%97%E7%89%9B%E6%98%9F%E9%99%85%E3%80%81%E9%BB%91%E7%BE%A4%E6%99%96%E3%80%81docker%E3%80%81%E5%AE%B9%E5%99%A8%E9%95%9C%E5%83%8F%E3%80%81%E5%9F%9F%E5%90%8D%E6%B3%A8%E5%86%8C%E3%80%81%E5%AE%9D%E5%A1%94%E3%80%81%E5%8F%8D%E5%90%91%E4%BB%A3%E7%90%86%E3%80%81nginx%E3%80%81frp%E3%80%81%E5%8A%A8%E6%80%81%E5%9F%9F%E5%90%8D%E8%A7%A3%E6%9E%90