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

希望作者编写一个自动更新cfIP的脚本 #1

Open
jsdfhasuh opened this issue Jul 16, 2023 · 1 comment
Open

希望作者编写一个自动更新cfIP的脚本 #1

jsdfhasuh opened this issue Jul 16, 2023 · 1 comment

Comments

@jsdfhasuh
Copy link

No description provided.

@152952849
Copy link

在CloudflareST更新hosts的后面加一段 但只能更新一个ip 希望有大佬写一个

echo "开始备份 mosdns 文件(hosts_backup)..."
\cp -f /etc/mosdns/config_custom.yaml /etc/mosdns/config_custom.bak

echo -e "开始替换mosdns..."
sed -i 's/'${NOWIP}'/'${BESTIP}'/g' /etc/mosdns/config_custom.yaml
echo -e "完成..."

echo -e "开始重启mosdns..."
/etc/init.d/mosdns restart

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