From 75b5b4d5a540a66f618bf32d0bec31b87b326f34 Mon Sep 17 00:00:00 2001 From: Alfonso Date: Wed, 15 Apr 2020 09:53:32 +0200 Subject: [PATCH] Update blocklist-update.sh --- blocklist-update.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/blocklist-update.sh b/blocklist-update.sh index d02a76d..3d7908b 100644 --- a/blocklist-update.sh +++ b/blocklist-update.sh @@ -14,6 +14,7 @@ GREP_PATH="/bin/grep" if [ -f $IPTABLES_PATH ]; then echo "iptables OK"; else echo "Cannot find [ iptables ]. Is it installed? Exiting"; exit 1; fi; #hash iptables 2>/dev/null || { echo >&2 "I require iptables but it's not installed. Aborting."; exit 1; } +#more in https://stackoverflow.com/questions/592620/how-can-i-check-if-a-program-exists-from-a-bash-script if [ -f $IPSET_PATH ]; then echo "ipset OK"; else echo "Cannot find [ ipset ]. Is it installed? Exiting"; exit 1; fi; if [ -f $SORT_PATH ]; then echo "sort OK"; else echo "Cannot find [ sort ]. Is it installed? Exiting"; exit 1; fi; if [ -f $MAIL_PATH ]; then echo "mail OK"; else echo "Cannot find [ mail ]. Is it installed? Exiting"; exit 1; fi;