Remove empty blacklist-domains and/or blacklist-ips files.

This commit is contained in:
Frank Denis
2012-09-26 11:34:20 +02:00
parent 11969f98da
commit 7b976aaa33
2 changed files with 8 additions and 2 deletions
@@ -2,7 +2,10 @@
. ./common.inc
[ -s "$BLACKLIST_DOMAINS_TMP_FILE" ] || exit 0
if [ ! -s "$BLACKLIST_DOMAINS_TMP_FILE" ]; then
rm -f "$BLACKLIST_DOMAINS_FILE"
exec ./switch-blacklists-on.sh
fi
tr -s '[:blank:]' '\n' \
< "$BLACKLIST_DOMAINS_TMP_FILE" > "${BLACKLIST_DOMAINS_TMP_FILE}~" &&
@@ -2,7 +2,10 @@
. ./common.inc
[ -s "$BLACKLIST_IPS_TMP_FILE" ] || exit 0
if [ ! -s "$BLACKLIST_IPS_TMP_FILE" ]; then
rm -f "$BLACKLIST_IPS_FILE"
exec ./switch-blacklists-on.sh
fi
tr -s '[:blank:]' '\n' \
< "$BLACKLIST_IPS_TMP_FILE" > "${BLACKLIST_IPS_TMP_FILE}~" &&