mirror of
https://github.com/tanrax/maza-ad-blocking.git
synced 2024-12-22 18:05:34 +01:00
Update maza
This commit is contained in:
parent
c35d32275e
commit
cebe8b5d18
18
maza
18
maza
@ -57,32 +57,32 @@ update() {
|
||||
curl -L -s "https://pgl.yoyo.org/adservers/serverlist.php?showintro=0&mimetype=plaintext" -o "$CONFIG/$LIST"
|
||||
# Clear list
|
||||
## Remove comments
|
||||
sed -i .bak '/^#/ d' "$CONFIG/$LIST"
|
||||
sed -i.bak '/^#/ d' "$CONFIG/$LIST"
|
||||
# Make dnsmasq format
|
||||
## 127.0.0.1 doubleclick.net to address=/doubleclick.net/127.0.0.1
|
||||
cp "$CONFIG/$LIST" "$CONFIG/$LIST_DNSMASQ"
|
||||
sed -i .bak 's/127.0.0.1 /address=\//g' "$CONFIG/$LIST_DNSMASQ"
|
||||
sed -i .bak 's/$/\/127.0.0.1/g' "$CONFIG/$LIST_DNSMASQ"
|
||||
sed -i.bak 's/127.0.0.1 /address=\//g' "$CONFIG/$LIST_DNSMASQ"
|
||||
sed -i.bak 's/$/\/127.0.0.1/g' "$CONFIG/$LIST_DNSMASQ"
|
||||
## Add start tag DNS list in first line
|
||||
sed -i .bak "1i\\
|
||||
sed -i.bak "1i\\
|
||||
$AUTHOR
|
||||
" "$CONFIG/$LIST"
|
||||
sed -i .bak "1i\\
|
||||
sed -i.bak "1i\\
|
||||
$PROJECT
|
||||
" "$CONFIG/$LIST"
|
||||
sed -i .bak "1i\\
|
||||
sed -i.bak "1i\\
|
||||
$START_TAG
|
||||
" "$CONFIG/$LIST"
|
||||
## Add end tag DNS list in first line
|
||||
echo $END_TAG >> "$CONFIG/$LIST"
|
||||
## Add start tag DNS dnsmasq in first line
|
||||
sed -i .bak "1i\\
|
||||
sed -i.bak "1i\\
|
||||
$AUTHOR
|
||||
" "$CONFIG/$LIST_DNSMASQ"
|
||||
sed -i .bak "1i\\
|
||||
sed -i.bak "1i\\
|
||||
$PROJECT
|
||||
" "$CONFIG/$LIST_DNSMASQ"
|
||||
sed -i .bak "1i\\
|
||||
sed -i.bak "1i\\
|
||||
$START_TAG
|
||||
" "$CONFIG/$LIST_DNSMASQ"
|
||||
## Add end tag DNS DNSMASQ in first line
|
||||
|
Loading…
Reference in New Issue
Block a user