Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

大神加个支持ubuntu的sh文件,每天定时更新ip文件呗。 #2

Open
star8618 opened this issue Jul 19, 2024 · 1 comment

Comments

@star8618
Copy link

大神加个支持ubuntu的sh文件,每天定时更新ip文件呗。

@caleee
Copy link
Owner

caleee commented Oct 26, 2024

更新脚本早就做出来了,
其实更新脚本是一键安装脚本的一部分,
一直也没计划做一键安装脚本,所以更新的部分也没有合并到项目.

你试试项目下的这个脚本:
/sh/update-bash.sh

  1. 下载放到服务器里的 /etc/mosdns/ 下
    命令:
curl -o /etc/mosdns/update.sh https://raw.githubusercontent.com/caleee/mosdns/refs/heads/main/sh/update-bash.sh
chmod +x /etc/mosdns/update.sh
  1. 设置计划任务:(每日凌晨3点更新规则)
    命令:
echo "$(crontab -l ; echo -e "\n# mosdns rules update\n0 3 * * * /etc/mosdns/update.sh update >>/var/log/mosdns-update.log 2>&1")" | crontab - && crontab -l

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants