mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 07:28:39 +01:00
adblock: update 3.5.2
backend: * add generic blocklist archive support * add support for blacklist archive from Toulouse 1 University Capitole * add support for urlhaus RPZ domains by abuse.ch * small bugfixes & enhancements luci: * archive sub-categories (shalla & ut_capitole) are now configurable via LuCI CBI template * small bugfixes & enhancements Signed-off-by: Dirk Brenken <dev@brenken.org>
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# adblock send mail script for mstmp
|
||||
# adblock send mail script for msmtp
|
||||
# written by Dirk Brenken (dev@brenken.org)
|
||||
# Please note: you have to install and configure the package 'mstmp' before using this script.
|
||||
# Please note: you have to install and configure the package 'msmtp' before using this script.
|
||||
|
||||
# This is free software, licensed under the GNU General Public License v3.
|
||||
# You should have received a copy of the GNU General Public License
|
||||
@@ -10,12 +10,25 @@
|
||||
|
||||
LC_ALL=C
|
||||
PATH="/usr/sbin:/usr/bin:/sbin:/bin"
|
||||
mail_ver="1.0.2"
|
||||
mail_ver="1.0.3"
|
||||
mail_daemon="$(command -v msmtp)"
|
||||
mail_profile="adb_notify"
|
||||
#mail_debug="--debug"
|
||||
mail_rc=1
|
||||
|
||||
# mail header & mail receiver check
|
||||
#
|
||||
mail_sender="no-reply@adblock"
|
||||
mail_receiver="!!!ChangeMe!!!"
|
||||
mail_topic="${HOSTNAME}: adblock notification"
|
||||
mail_head="From: ${mail_sender}\nTo: ${mail_receiver}\nSubject: ${mail_topic}\nReply-to: ${mail_sender}\nMime-Version: 1.0\nContent-Type: text/html\nContent-Disposition: inline\n\n"
|
||||
|
||||
if [ "${mail_receiver}" = "!!!ChangeMe!!!" ]
|
||||
then
|
||||
logger -p "err" -t "adblock-notify-[${mail_ver}]" "please change the 'mail_receiver' in '/etc/adblock/adblock.notify'"
|
||||
exit ${mail_rc}
|
||||
fi
|
||||
|
||||
# mail daemon check
|
||||
#
|
||||
if [ ! -x "${mail_daemon}" ]
|
||||
@@ -34,13 +47,6 @@ else
|
||||
log_info="$(logread -e "adblock-" | awk '{NR=1;max=79;if(length($0)>max+1)while($0){if(NR==1){print substr($0,1,max),"↵"} else {print " ",substr($0,1,max)}{$0=substr($0,max+1);NR=NR+1}}else print}')"
|
||||
fi
|
||||
|
||||
# mail header
|
||||
#
|
||||
mail_sender="no-reply@adblock"
|
||||
mail_receiver="!!!ChangeMe!!!"
|
||||
mail_topic="adblock notification"
|
||||
mail_head="From: ${mail_sender}\nTo: ${mail_receiver}\nSubject: ${mail_topic}\nReply-to: ${mail_sender}\nMime-Version: 1.0\nContent-Type: text/html\nContent-Disposition: inline\n\n"
|
||||
|
||||
# mail body
|
||||
#
|
||||
mail_text="<html><body><pre style='display:block;font-family:monospace;font-size:1rem;padding:20;background-color:#f3eee5;white-space:pre'>"
|
||||
|
||||
Reference in New Issue
Block a user