sudo apt update
sudo apt upgrade -y
apt install nano curl -y
timedatectl set-timezone Asia/Shanghai
nano /etc/ssh/sshd_config
sudo service ssh restart
curl -s -S -L https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh | sh -s -- -v
https://github.com/rwx9032/AdguardHome
下载 AdGuardHome.yaml 到您的 AdGuardHome 目录
下载上游 DNS 配置文件:wget -O /root/AdguardHome_Upstreams.txt https://raw.githubusercontent.com/rwx9032/AdguardHome/refs/heads/main/AdguardHome_Upstreams_Autoupdate.txt
重启 AdGuardHome 服务
立即更改管理员密码
创建一个shell脚本文件,比如ad.sh,内容如下:
!/bin/bash
wget -O /root/AdguardHome_Upstreams.txt https://raw.githubusercontent.com/rwx9032/AdguardHome/refs/heads/main/AdguardHome_Upstreams_Autoupdate.txt
使用chmod命令添加执行权限
chmod +x ad.sh
使用crontab命令编辑定时任务
crontab -e
添加以下内容来设置定时任务
0 6 * /root/ad.sh
每天的6点0分执行
Comments | NOTHING