mirror of
https://gitlab.com/robocopAlpha/pihole_lists.git
synced 2026-05-20 19:49:06 -07:00
adapting to work with both mac and linux
This commit is contained in:
parent
2baf1d1de7
commit
daa48b1ced
4 changed files with 102 additions and 64 deletions
16
block_FB.sh
16
block_FB.sh
|
|
@ -1,13 +1,13 @@
|
|||
#!/usr/bin/env bash
|
||||
# Facebook & Whatsapp
|
||||
|
||||
WRK_DIR=/home/dietpi/pihole_lists
|
||||
cd ${WRK_DIR}/Mirrors
|
||||
[[ -f set_env.sh ]] && source set_env.sh || { echo "set_env.sh not found"; exit 1; }
|
||||
|
||||
rg -FINv "whatsapp" ${WRK_DIR}/Mirrors/facebook_block.txt >| ${WRK_DIR}/Mirrors/tmp.txt
|
||||
rg -FIN "whatsapp" ${WRK_DIR}/Mirrors/facebook_block.txt | rg -FIN "facebook" >> ${WRK_DIR}/Mirrors/tmp.txt
|
||||
rm -f ${WRK_DIR}/Mirrors/facebook_block.txt
|
||||
sort -u ${WRK_DIR}/Mirrors/tmp.txt | uniq > ${WRK_DIR}/facebook_block.txt
|
||||
rm -f ${WRK_DIR}/Mirrors/tmp.txt
|
||||
echo -e " \n $(wc -l ${WRK_DIR}/facebook_block.txt) domains\n"
|
||||
rg -FINv "whatsapp" "${WRK_DIR}/Mirrors/facebook_block.txt" >| "${WRK_DIR}/Mirrors/tmp.txt"
|
||||
rg -FIN "whatsapp" "${WRK_DIR}/Mirrors/facebook_block.txt" | rg -FIN "facebook" >> "${WRK_DIR}/Mirrors/tmp.txt"
|
||||
rm -f "${WRK_DIR}/Mirrors/facebook_block.txt"
|
||||
sort -u "${WRK_DIR}/Mirrors/tmp.txt" | uniq > "${WRK_DIR}/facebook_block.txt"
|
||||
rm -f "${WRK_DIR}/Mirrors/tmp.txt"
|
||||
Line_Count=$(wc -l "${WRK_DIR}/facebook_block.txt")
|
||||
echo -e "${Line_Count} domains"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue