From e974b64c5a5d547fb1059891414fafc739a95cc7 Mon Sep 17 00:00:00 2001
From: Pawel Krawczyk
Date: Tue, 30 Dec 2014 16:08:32 +0000
Subject: [PATCH] mute warning messages when set already exists
---
blacklist.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/blacklist.sh b/blacklist.sh
index 2b25190..636e863 100644
--- a/blacklist.sh
+++ b/blacklist.sh
@@ -79,7 +79,7 @@ for url in $urls; do
echo "destroy ${tmp_set_name}" >>"${new_set_file}" # remove old set
# actually execute the set update
- ipset restore < "${new_set_file}"
+ ipset -! -q restore < "${new_set_file}"
iptables -A ${blocklist_chain_name} -m set --match-set "${set_name}" src,dst -m limit --limit 10/minute -j LOG --log-prefix "BLOCK ${set_name} "
iptables -A ${blocklist_chain_name} -m set --match-set "${set_name}" src,dst -j DROP