From d0529238975ed7c71a843fa9d310962823f2bd73 Mon Sep 17 00:00:00 2001 From: CallMeR <9463297+callmer@user.noreply.gitee.com> Date: Sat, 9 Dec 2023 01:32:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=96=87=E4=BB=B6=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...masq_plugin.conf => debian_dns_dnsmasq_cron.conf} | 6 +++--- src/debian/debian_dns_smartdns_cron.conf | 12 ++++++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) rename src/debian/{debian_dns_dnsmasq_plugin.conf => debian_dns_dnsmasq_cron.conf} (79%) create mode 100644 src/debian/debian_dns_smartdns_cron.conf diff --git a/src/debian/debian_dns_dnsmasq_plugin.conf b/src/debian/debian_dns_dnsmasq_cron.conf similarity index 79% rename from src/debian/debian_dns_dnsmasq_plugin.conf rename to src/debian/debian_dns_dnsmasq_cron.conf index aeb5f38..013daf2 100644 --- a/src/debian/debian_dns_dnsmasq_plugin.conf +++ b/src/debian/debian_dns_dnsmasq_cron.conf @@ -1,8 +1,8 @@ ## 下载 dnsmasq 插件安装脚本 -$ sudo wget https://gitee.com/felixonmars/dnsmasq-china-list/raw/master/install.sh -O /opt/install.sh +$ sudo wget https://gitee.com/felixonmars/dnsmasq-china-list/raw/master/install.sh -O /opt/dnsmasq_plugin.sh ## 设置安装脚本权限 -$ sudo chmod +x /opt/install.sh +$ sudo chmod +x /opt/dnsmasq_plugin.sh ## 设置 crontab @@ -12,5 +12,5 @@ $ sudo chmod +x /opt/install.sh 25 5 * * * /usr/bin/systemctl restart smartdns.service -30 5 * * * /usr/bin/bash /opt/install.sh +30 5 * * * /usr/bin/bash /opt/dnsmasq_plugin.sh diff --git a/src/debian/debian_dns_smartdns_cron.conf b/src/debian/debian_dns_smartdns_cron.conf new file mode 100644 index 0000000..a4593ab --- /dev/null +++ b/src/debian/debian_dns_smartdns_cron.conf @@ -0,0 +1,12 @@ +## 下载 dnsmasq 插件安装脚本 +$ sudo wget https://gitee.com/callmer/pve_toss_notes/raw/master/src/debian/debian_dns_smartdns_plugin.conf -O /opt/smartdns_plugin.sh + +## 设置安装脚本权限 +$ sudo chmod +x /opt/smartdns_plugin.sh + +## 设置 crontab + +15 5 * * * /usr/bin/wget -q --tries=10 --retry-connrefused --random-wait https://anti-ad.net/anti-ad-for-smartdns.conf -O /etc/smartdns/anti-ad-smartdns.conf + +20 5 * * * /usr/bin/bash /opt/smartdns_plugin.sh +