Archived
整理文档结构
This commit is contained in:
+31
-31
@@ -273,7 +273,37 @@ $ sudo chattr +i /opt/smartdns-plugin.sh
|
||||
$ sudo bash /opt/smartdns-plugin.sh
|
||||
```
|
||||
|
||||
### 6.2. SmartDNS 主配置
|
||||
### 6.2.定时任务
|
||||
|
||||
本步骤为可选操作,主要用于设置 `SmartDNS` 定时更新附加配置文件和定时重启。
|
||||
|
||||
```bash
|
||||
## 编辑系统定时任务,编辑器选择 nano
|
||||
$ sudo crontab -e
|
||||
```
|
||||
|
||||
在配置文件末尾,增加以下配置项。
|
||||
|
||||
```bash
|
||||
## 定时任务配置项
|
||||
|
||||
20 9 * * * /usr/bin/curl --retry-connrefused --retry 5 --retry-delay 5 --retry-max-time 60 -fsSLR -o /etc/smartdns.d/neodevhost.smartdns.conf https://neodev.team/lite_smartdns.conf
|
||||
|
||||
30 9 * * * /usr/bin/systemctl restart smartdns.service
|
||||
|
||||
```
|
||||
|
||||
若使用了 `SmartDNS` 加速规则的安装脚本,由于脚本自带服务重启功能,因此定时任务可修改如下。
|
||||
|
||||
```bash
|
||||
## 定时任务配置项
|
||||
|
||||
20 9 * * * /usr/bin/curl --retry-connrefused --retry 5 --retry-delay 5 --retry-max-time 60 -fsSLR -o /etc/smartdns.d/neodevhost.smartdns.conf https://neodev.team/lite_smartdns.conf
|
||||
|
||||
30 9 * * * /usr/bin/bash /opt/smartdns-plugin.sh
|
||||
```
|
||||
|
||||
### 6.3. SmartDNS 主配置
|
||||
|
||||
`SmartDNS` 配置较为复杂,可按需制定各类 DNS 请求规则,建议先查阅官方提供的 [配置指导](https://pymumu.github.io/smartdns/config/basic-config/) 和 [配置选项](https://pymumu.github.io/smartdns/configuration/) 。
|
||||
|
||||
@@ -367,36 +397,6 @@ server-https https://dns.alidns.com/dns-query
|
||||
|
||||
```
|
||||
|
||||
### 6.3.定时任务
|
||||
|
||||
本步骤为可选操作,主要用于设置 `SmartDNS` 定时更新附加配置文件和定时重启。
|
||||
|
||||
```bash
|
||||
## 编辑系统定时任务,编辑器选择 nano
|
||||
$ sudo crontab -e
|
||||
```
|
||||
|
||||
在配置文件末尾,增加以下配置项。
|
||||
|
||||
```bash
|
||||
## 定时任务配置项
|
||||
|
||||
20 9 * * * /usr/bin/curl --retry-connrefused --retry 5 --retry-delay 5 --retry-max-time 60 -fsSLR -o /etc/smartdns.d/neodevhost.smartdns.conf https://neodev.team/lite_smartdns.conf
|
||||
|
||||
30 9 * * * /usr/bin/systemctl restart smartdns.service
|
||||
|
||||
```
|
||||
|
||||
若使用了 `SmartDNS` 加速规则的安装脚本,由于脚本自带服务重启功能,因此定时任务可修改如下。
|
||||
|
||||
```bash
|
||||
## 定时任务配置项
|
||||
|
||||
20 9 * * * /usr/bin/curl --retry-connrefused --retry 5 --retry-delay 5 --retry-max-time 60 -fsSLR -o /etc/smartdns.d/neodevhost.smartdns.conf https://neodev.team/lite_smartdns.conf
|
||||
|
||||
30 9 * * * /usr/bin/bash /opt/smartdns-plugin.sh
|
||||
```
|
||||
|
||||
### 6.4.配置 Dnsmasq
|
||||
|
||||
`Dnsmasq` 的主配置文件一般位于 `/etc` 目录下,修改配置文件之前,执行以下命令将其备份。
|
||||
|
||||
Reference in New Issue
Block a user