Skip to content

Commit

Permalink
Fix whitelist script
Browse files Browse the repository at this point in the history
  • Loading branch information
willnode committed Mar 2, 2024
1 parent 7b26b10 commit bb4afc8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions src/whitelist/refresh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@ ipset flush whitelist-v6
while read p; do
if [[ $p != "" ]];
then
ipset -! add whitelist $q
ipset -! add whitelist $p
fi
done <"$SCRIPT_DIR/ipv4_addresses.txt"

while read p; do
if [[ $p != "" ]];
then
ipset -! add whitelist_v6 $q
ipset -! add whitelist-v6 $p
fi
done <"$SCRIPT_DIR/ipv6_addresses.txt"

if [ ! -f "$SCRIPT_DIR/hosts.txt" ]; then
Expand Down
6 changes: 3 additions & 3 deletions src/whitelist/resolve.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ done

printf '\n'

echo "$IPV4_ADDRESSES" > ipv4_adresses.txt
echo "$IPV6_ADDRESSES" > ipv6_adresses.txt
echo "$HOST_ADDRESSES" > host_adresses.txt
echo "$IPV4_ADDRESSES" > "$SCRIPT_DIR/ipv4_addresses.txt"
echo "$IPV6_ADDRESSES" > "$SCRIPT_DIR/ipv6_addresses.txt"
echo "$HOST_ADDRESSES" > "$SCRIPT_DIR/host_addresses.txt"

0 comments on commit bb4afc8

Please sign in to comment.