16 lines
383 B
Bash
Executable File
16 lines
383 B
Bash
Executable File
#! /bin/sh
|
|
|
|
. ./common.inc
|
|
|
|
if [ ! -s "$BLACKLIST_IPS_TMP_FILE" ]; then
|
|
rm -f "$BLACKLIST_IPS_FILE" "$BLACKLIST_IPS_TMP_FILE"
|
|
exec ./switch-blacklists-on.sh
|
|
fi
|
|
|
|
tr -s '[:blank:]' '\n' < "$BLACKLIST_IPS_TMP_FILE" | \
|
|
egrep -i '^[0-9a-fA-F:.]+([.][*])?$' > \
|
|
"${BLACKLIST_IPS_TMP_FILE}~" &&
|
|
mv "${BLACKLIST_IPS_TMP_FILE}~" "$BLACKLIST_IPS_FILE"
|
|
|
|
exec ./switch-blacklists-on.sh
|