mirror of
https://github.com/privacy-protection-tools/anti-AD.git
synced 2025-02-02 19:53:02 +08:00
15 lines
632 B
Bash
Executable File
15 lines
632 B
Bash
Executable File
#!/bin/bash
|
|
#每周运行一次
|
|
|
|
source /etc/profile
|
|
cd $(cd "$(dirname "$0")";pwd)
|
|
|
|
nohup php research-addr.php >> ./std-research.out
|
|
cd ../dist/
|
|
sed -E 's/address=\/(.+)?\//||\1^/g' anti-ad-dnsmasq-full.conf > anti-ad-easylist-full.conf
|
|
sed -E 's/address=\/(.+)?\//||\1^/g' anti-ad-dnsmasq-basic.conf > anti-ad-easylist-basic.conf
|
|
sed -E 's/address=\/(.+)?\//DOMAIN-SUFFIX,\1,REJECT/g' anti-ad-dnsmasq-basic.conf >anti-ad-surge-basic.txt
|
|
sed -E 's/address=\/(.+)?\//DOMAIN-SUFFIX,\1,REJECT/g' anti-ad-dnsmasq-full.conf >anti-ad-surge-full.txt
|
|
sed -i '3 i [RULE]' anti-ad-surge-basic.txt
|
|
sed -i '3 i [RULE]' anti-ad-surge-full.txt
|