mirror of
https://github.com/pi-hole/pi-hole
synced 2024-12-22 23:08:07 +00:00
Merge pull request #2343 from pi-hole/tweak/audit_log
Add facility to add multiple audit list entries at once and to nuke audit list
This commit is contained in:
commit
afdc4219d0
@ -525,9 +525,19 @@ Teleporter() {
|
|||||||
php /var/www/html/admin/scripts/pi-hole/php/teleporter.php > "pi-hole-teleporter_${datetimestamp}.zip"
|
php /var/www/html/admin/scripts/pi-hole/php/teleporter.php > "pi-hole-teleporter_${datetimestamp}.zip"
|
||||||
}
|
}
|
||||||
|
|
||||||
audit()
|
addAudit()
|
||||||
{
|
{
|
||||||
echo "${args[2]}" >> /etc/pihole/auditlog.list
|
shift # skip "-a"
|
||||||
|
shift # skip "audit"
|
||||||
|
for var in "$@"
|
||||||
|
do
|
||||||
|
echo "${var}" >> /etc/pihole/auditlog.list
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
clearAudit()
|
||||||
|
{
|
||||||
|
echo -n "" > /etc/pihole/auditlog.list
|
||||||
}
|
}
|
||||||
|
|
||||||
SetPrivacyLevel() {
|
SetPrivacyLevel() {
|
||||||
@ -565,7 +575,8 @@ main() {
|
|||||||
"-i" | "interface" ) SetListeningMode "$@";;
|
"-i" | "interface" ) SetListeningMode "$@";;
|
||||||
"-t" | "teleporter" ) Teleporter;;
|
"-t" | "teleporter" ) Teleporter;;
|
||||||
"adlist" ) CustomizeAdLists;;
|
"adlist" ) CustomizeAdLists;;
|
||||||
"audit" ) audit;;
|
"audit" ) addAudit "$@";;
|
||||||
|
"clearaudit" ) clearAudit;;
|
||||||
"-l" | "privacylevel" ) SetPrivacyLevel;;
|
"-l" | "privacylevel" ) SetPrivacyLevel;;
|
||||||
* ) helpFunc;;
|
* ) helpFunc;;
|
||||||
esac
|
esac
|
||||||
|
Loading…
Reference in New Issue
Block a user