simple-adblock: bugfix: update config; use command -v

Signed-off-by: Stan Grishin <stangri@melmac.net>
This commit is contained in:
Stan Grishin
2020-08-21 23:29:33 +00:00
parent 4c1293e3f8
commit b3170384c1
4 changed files with 5 additions and 4 deletions
+2 -2
View File
@@ -247,10 +247,10 @@ load_package_config() {
. /lib/functions/network.sh
. /usr/share/libubox/jshn.sh
# Prefer curl because it supports the file:// scheme.
if [ -x /usr/bin/curl ]; then
if command -v curl >/dev/null 2>&1; then
dl_command="curl --insecure --retry $curlRetry --connect-timeout $dlTimeout --silent"
dl_flag="-o"
elif wget --version 2>/dev/null | grep -q "+https"; then
elif command -v wget >/dev/null 2>&1 && wget --version 2>/dev/null | grep -q "+https"; then
dl_command="wget --no-check-certificate --timeout $dlTimeout -q"
dl_flag="-O"
else