Skip to content

Commit

Permalink
Update webfilter-reload.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
juliocbc authored Oct 10, 2020
1 parent 1f7857a commit 075f7e5
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions www/webfilter/src/opnsense/scripts/webfilter/webfilter-reload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ domains)
local INDEX_CLEAN=$(cat $BLACKLIST_INDEX | grep -v ^$ > /tmp/blacklist.index.$$)
mv /tmp/blacklist.index.$$ $BLACKLIST_INDEX

# dir sanitization
# Suspeita de derrubar o SquidGuard - ref. issue #144
# rm -f $BLACKLIST_DOMAINS.*

# create domains file to each rule
for rule in $(cat $BLACKLIST_INDEX | cut -d: -f2); do
#let's populate the file
Expand All @@ -60,10 +56,6 @@ regex)
local INDEX_CLEAN=$(cat $BLACKLISTREGEX_INDEX | grep -v ^$ > /tmp/blacklistregex.index.$$)
mv /tmp/blacklistregex.index.$$ $BLACKLISTREGEX_INDEX

# dir sanitization
# Suspeita de derrubar o SquidGuard - ref. issue #144
# rm -f $BLACKLIST_REGEX.*

# create domains file to each rule
for rule in $(cat $BLACKLISTREGEX_INDEX | cut -d: -f2); do
#let's populate the file
Expand Down Expand Up @@ -94,10 +86,6 @@ domains)
local INDEX_CLEAN=$(cat $WHITELIST_INDEX | grep -v ^$ > /tmp/whitelist.index.$$)
mv /tmp/whitelist.index.$$ $WHITELIST_INDEX

# dir sanitization
# Suspeita de derrubar o SquidGuard - ref. issue #144
#rm -f $WHITELIST_DOMAINS.*

# create domains file to each rule
for rule in $(cat $WHITELIST_INDEX | cut -d: -f2); do
#let's populate the file
Expand All @@ -114,10 +102,6 @@ regex)
local INDEX_CLEAN=$(cat $WHITELISTREGEX_INDEX | grep -v ^$ > /tmp/whitelistregex.index.$$)
mv /tmp/whitelistregex.index.$$ $WHITELISTREGEX_INDEX

# dir sanitization
# Suspeita de derrubar o SquidGuard - ref. issue #144
#rm -f $WHITELIST_REGEX.*

# create domains file to each rule
for rule in $(cat $WHITELISTREGEX_INDEX | cut -d: -f2); do
#let's populate the file
Expand All @@ -142,14 +126,6 @@ local DEST_CHECK=$(xmllint --nocdata --xpath "//webfilter//rules//destination" /
cut -d"<" -f1 | sed 's/\,/ /g')
local ACTIVE_CATEG=$(xmllint --nocdata --xpath "//webfilter//general//categories" /conf/config.xml | cut -d">" -f2 | cut -d"<" -f1 | sed 's/\,/ /g')

#for category in $DEST_CHECK; do
# CHK_IFEXIST=$(echo $ACTIVE_CATEG | grep $category )
# if [ -z "$CHK_IFEXIST" ];then
# echo "The category $category is in use and can't be removed!"
# exit 0
# fi
#done

# Build JSON index
echo -n "{" > $TMP_CATEG_INDEX
for category in $CATEGORIES; do
Expand Down

0 comments on commit 075f7e5

Please sign in to comment.