mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-04-25 08:40:12 +00:00
Update audit script to store domains in new database table.
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
parent
0c8f5f1221
commit
5293beeb77
1 changed files with 5 additions and 5 deletions
|
@ -546,17 +546,17 @@ addAudit()
|
||||||
{
|
{
|
||||||
shift # skip "-a"
|
shift # skip "-a"
|
||||||
shift # skip "audit"
|
shift # skip "audit"
|
||||||
for var in "$@"
|
for domain in "$@"
|
||||||
do
|
do
|
||||||
echo "${var}" >> /etc/pihole/auditlog.list
|
# Insert only the domain here. The date_added field will be
|
||||||
|
# filled with its default value (date_added = current timestamp)
|
||||||
|
sqlite3 "${gravityDBfile}" "INSERT INTO \"audit\" (domain) VALUES ('${domain}');"
|
||||||
done
|
done
|
||||||
chmod 644 /etc/pihole/auditlog.list
|
|
||||||
}
|
}
|
||||||
|
|
||||||
clearAudit()
|
clearAudit()
|
||||||
{
|
{
|
||||||
echo -n "" > /etc/pihole/auditlog.list
|
sqlite3 "${gravityDBfile}" "DELETE FROM \"audit\";"
|
||||||
chmod 644 /etc/pihole/auditlog.list
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SetPrivacyLevel() {
|
SetPrivacyLevel() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue