Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bwupdate.sh not working #12

Closed
seyfullahkilic opened this issue Oct 22, 2020 · 2 comments
Closed

bwupdate.sh not working #12

seyfullahkilic opened this issue Oct 22, 2020 · 2 comments

Comments

@seyfullahkilic
Copy link

Hi,

While I'm running the "bwupdate.sh" on Linux machine, not finished (terminal output > "Downloading Blocklists...").

Maybe, some URLs not respond.

@elico
Copy link

elico commented Oct 29, 2020

@seyfullahkilic A simple connect timeout for the curl command might help avoiding this.

@maravento
Copy link
Owner

maravento commented Oct 30, 2020

Blackweb is already optimized and without errors. So bwupdate.sh is not necessary for user to run it. Note that this process can take time and consume a lot of hardware and bandwidth resources, therefore it is recommended to use test equipment.
We have changed the method. Now bwupdate.sh does the following:

wget --no-check-certificate --timeout=10 --tries=1 --method=HEAD "$1" &>/dev/null
    if [ $? -eq 0 ]; then
		    $wgetd "$1" -O - >> bwtmp/bw
	    else
		    echo ERROR "$1"
    fi

First check if the link exists. If it does not exist, it indicates an ERROR. If it exists, it runs the variable $wgetd and download the links. Example:

wgetd='wget -q -c --no-check-certificate --retry-connrefused --timeout=10 --tries=4'
$wgetd 'http:https://adaway.org/hosts.txt'

Changes In commit 501d189

Thanks for the contributions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants