mirror of
https://github.com/milleruk/adguard-filter-list.git
synced 2026-06-29 17:01:36 +00:00
Blocklist update
This commit is contained in:
28
script.sh
28
script.sh
@@ -1,6 +1,26 @@
|
||||
#!/bin/bash
|
||||
|
||||
cd /home/adguard-filter-list
|
||||
|
||||
# Navigate to blocklist directory
|
||||
cd /opt/data || { echo "Directory not found: ./data/blocklist/"; exit 1; }
|
||||
|
||||
# Download the oisd.txt file
|
||||
oisd_url="https://big.oisd.nl"
|
||||
oisd_file="oisd.txt"
|
||||
|
||||
echo "Downloading oisd.txt from $oisd_url..."
|
||||
wget -q -O $oisd_file $oisd_url
|
||||
|
||||
|
||||
# Verify the download
|
||||
if [[ $? -ne 0 || ! -f $oisd_file ]]; then
|
||||
echo "Error: Failed to download oisd.txt from $oisd_url"
|
||||
exit 1
|
||||
else
|
||||
echo "Successfully downloaded $oisd_file"
|
||||
fi
|
||||
|
||||
cd /opt/adguard-filter-list
|
||||
|
||||
# Create compiled blocklist
|
||||
time /usr/local/bin/hostlist-compiler -v -c hostlist-compiler-config.json -o blocklist
|
||||
@@ -10,6 +30,6 @@ currentDate=`/bin/date '+%Y-%m-%d'`
|
||||
currentTime=`/bin/date '+%H:%M:%S'`
|
||||
|
||||
# Push it to GitHub
|
||||
git add *
|
||||
git commit -m "Blocklist update ${currentDate} ${currentTime}"
|
||||
git push
|
||||
#git add *
|
||||
#git commit -m "Blocklist update ${currentDate} ${currentTime}"
|
||||
#git push
|
||||
|
||||
Reference in New Issue
Block a user