From c526a3150482370045735622cb277bac7ec4afcd Mon Sep 17 00:00:00 2001
From: Pawel Krawczyk
Date: Mon, 12 Jan 2015 10:57:11 +0000
Subject: [PATCH] do not display error messages from which
---
blacklist.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/blacklist.sh b/blacklist.sh
index a7d363c..3937ce2 100755
--- a/blacklist.sh
+++ b/blacklist.sh
@@ -13,19 +13,19 @@ urls="$urls http://www.badips.com/get/list/ssh/2"
blocklist_chain_name=blocklists
-if [ -z "$(which ipset)" ]; then
+if [ -z "$(which ipset 2>/dev/null)" ]; then
echo "Cannot find ipset"
echo "Run \"apt-get install ipset\" or \"yum install ipset\""
exit 1
fi
-if [ -z "$(which curl)" ]; then
+if [ -z "$(which curl 2>/dev/null)" ]; then
echo "Cannot find curl"
echo "Run \"apt-get install curl\" or \"yum install curl\""
exit 1
fi
-if [ "$(which uci)" ]; then
+if [ "$(which uci 2>/dev/null)" ]; then
# we're on OpenWRT
wan_iface=$(uci get network.wan.ifname)
IN_OPT="-i $wan_iface"