summaryrefslogtreecommitdiff
path: root/net/simple-adblock/files/simple-adblock.init
diff options
context:
space:
mode:
authorStan Grishin <stangri@melmac.net>2020-08-21 23:29:33 +0000
committerStan Grishin <stangri@melmac.net>2020-08-21 23:29:33 +0000
commitb3170384c16133042a504fa911189d80294f7b43 (patch)
treeb0d74bd236eb8e6f0a841422fc7051f2c88164b0 /net/simple-adblock/files/simple-adblock.init
parent4c1293e3f899cde0edf9c4b8efbf93c3bd215783 (diff)
simple-adblock: bugfix: update config; use command -v
Signed-off-by: Stan Grishin <stangri@melmac.net>
Diffstat (limited to 'net/simple-adblock/files/simple-adblock.init')
-rw-r--r--net/simple-adblock/files/simple-adblock.init4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/simple-adblock/files/simple-adblock.init b/net/simple-adblock/files/simple-adblock.init
index 69a1ff6af..40e977ab0 100644
--- a/net/simple-adblock/files/simple-adblock.init
+++ b/net/simple-adblock/files/simple-adblock.init
@@ -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