mirror of
https://gitee.com/callmer/pve_toss_notes.git
synced 2026-08-31 05:52:52 +08:00
替换 wget 命令
This commit is contained in:
+4
-4
@@ -244,7 +244,7 @@ $ sudo systemctl enable smartdns.service
|
||||
$ sudo mkdir -p /etc/smartdns.d
|
||||
|
||||
## 下载广告过滤配置文件
|
||||
$ sudo wget https://anti-ad.net/anti-ad-for-smartdns.conf -O /etc/smartdns.d/anti-ad-smartdns.conf
|
||||
$ sudo curl -o /etc/smartdns.d/anti-ad-smartdns.conf https://anti-ad.net/anti-ad-for-smartdns.conf
|
||||
```
|
||||
|
||||
修改 `SmartDNS` 主配置文件之前,建议关闭 `SmartDNS` 并清理 DNS 缓存文件。
|
||||
@@ -344,7 +344,7 @@ server-https https://dns.alidns.com/dns-query
|
||||
|
||||
```bash
|
||||
## 下载插件安装脚本
|
||||
$ sudo wget https://gitee.com/callmer/smartdns_china_list_installer/raw/main/smartdns_plugin.sh -O /opt/smartdns_plugin.sh
|
||||
$ sudo curl -o /opt/smartdns_plugin.sh https://gitee.com/callmer/smartdns_china_list_installer/raw/main/smartdns_plugin.sh
|
||||
|
||||
## 设置安装脚本可执行权限
|
||||
$ sudo chmod +x /opt/smartdns_plugin.sh
|
||||
@@ -372,7 +372,7 @@ $ sudo crontab -e
|
||||
```bash
|
||||
## 定时任务配置项
|
||||
|
||||
15 5 * * * /usr/bin/wget -q --tries=10 --retry-connrefused --random-wait https://anti-ad.net/anti-ad-for-smartdns.conf -O /etc/smartdns.d/anti-ad-smartdns.conf
|
||||
15 5 * * * /usr/bin/curl -s -R --retry 5 --retry-connrefused --retry-delay 5 --retry-max-time 60 -o /etc/smartdns.d/anti-ad-smartdns.conf https://anti-ad.net/anti-ad-for-smartdns.conf
|
||||
|
||||
20 5 * * * /usr/bin/systemctl restart smartdns.service
|
||||
|
||||
@@ -382,7 +382,7 @@ $ sudo crontab -e
|
||||
|
||||
```bash
|
||||
## 定时任务配置项
|
||||
15 5 * * * /usr/bin/wget -q --tries=10 --retry-connrefused --random-wait https://anti-ad.net/anti-ad-for-smartdns.conf -O /etc/smartdns.d/anti-ad-smartdns.conf
|
||||
15 5 * * * /usr/bin/curl -s -R --retry 5 --retry-connrefused --retry-delay 5 --retry-max-time 60 -o /etc/smartdns.d/anti-ad-smartdns.conf https://anti-ad.net/anti-ad-for-smartdns.conf
|
||||
|
||||
20 5 * * * /usr/bin/bash /opt/smartdns_plugin.sh
|
||||
```
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
## 下载 dnsmasq 插件安装脚本
|
||||
$ sudo wget https://gitee.com/felixonmars/dnsmasq-china-list/raw/master/install.sh -O /opt/dnsmasq_plugin.sh
|
||||
$ sudo curl -o /opt/dnsmasq_plugin.sh https://gitee.com/felixonmars/dnsmasq-china-list/raw/master/install.sh
|
||||
|
||||
## 设置安装脚本权限
|
||||
$ sudo chmod +x /opt/dnsmasq_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.d/anti-ad-smartdns.conf
|
||||
15 5 * * * /usr/bin/curl -s -R --retry 5 --retry-connrefused --retry-delay 5 --retry-max-time 60 -o /etc/smartdns.d/anti-ad-smartdns.conf https://anti-ad.net/anti-ad-for-smartdns.conf
|
||||
|
||||
20 5 * * * /usr/bin/wget -q --tries=10 --retry-connrefused --random-wait https://anti-ad.net/anti-ad-for-dnsmasq.conf -O /etc/dnsmasq.d/anti-ad-dnsmasq.conf
|
||||
20 5 * * * /usr/bin/curl -s -R --retry 5 --retry-connrefused --retry-delay 5 --retry-max-time 60 -o /etc/dnsmasq.d/anti-ad-dnsmasq.conf https://anti-ad.net/anti-ad-for-dnsmasq.conf
|
||||
|
||||
25 5 * * * /usr/bin/systemctl restart smartdns.service
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
# This configuration file is customized by fox,
|
||||
# Optimize SmartDNS crontab for local DNS server.
|
||||
|
||||
15 5 * * * /usr/bin/wget -q --tries=10 --retry-connrefused --random-wait https://anti-ad.net/anti-ad-for-smartdns.conf -O /etc/smartdns.d/anti-ad-smartdns.conf
|
||||
15 5 * * * /usr/bin/curl -s -R --retry 5 --retry-connrefused --retry-delay 5 --retry-max-time 60 -o /etc/smartdns.d/anti-ad-smartdns.conf https://anti-ad.net/anti-ad-for-smartdns.conf
|
||||
|
||||
20 5 * * * /usr/bin/systemctl restart smartdns.service
|
||||
|
||||
|
||||
## Or when the smartdns plugin is installed
|
||||
|
||||
15 5 * * * /usr/bin/wget -q --tries=10 --retry-connrefused --random-wait https://anti-ad.net/anti-ad-for-smartdns.conf -O /etc/smartdns.d/anti-ad-smartdns.conf
|
||||
15 5 * * * /usr/bin/curl -s -R --retry 5 --retry-connrefused --retry-delay 5 --retry-max-time 60 -o /etc/smartdns.d/anti-ad-smartdns.conf https://anti-ad.net/anti-ad-for-smartdns.conf
|
||||
|
||||
20 5 * * * /usr/bin/bash /opt/smartdns_plugin.sh
|
||||
|
||||
|
||||
Reference in New Issue
Block a user