Avoid reporting pihole updates

This commit is contained in:
Bob Mottram 2017-01-15 14:50:42 +00:00
parent c1ac920a87
commit 72cfef8bb7
2 changed files with 8 additions and 0 deletions

View File

@ -116,6 +116,11 @@ function pihole_update {
pihole -g pihole -g
systemctl restart dnsmasq systemctl restart dnsmasq
# avoid having the tripwire report pihole updates
if ! grep -q '!/etc/pihole' /etc/tripwire/twpol.txt; then
sed -i '\|/etc\t\t->.*|a\ !/etc/pihole ;' /etc/tripwire/twpol.txt
fi
} }
function pihole_change_upstream_dns { function pihole_change_upstream_dns {

View File

@ -79,6 +79,9 @@ function install_tripwire {
if ! grep -q '!/etc/tripwire' /etc/tripwire/twpol.txt; then if ! grep -q '!/etc/tripwire' /etc/tripwire/twpol.txt; then
sed -i '\|/etc\t\t->.*|a\ !/etc/tripwire ;' /etc/tripwire/twpol.txt sed -i '\|/etc\t\t->.*|a\ !/etc/tripwire ;' /etc/tripwire/twpol.txt
fi fi
if ! grep -q '!/etc/pihole' /etc/tripwire/twpol.txt; then
sed -i '\|/etc\t\t->.*|a\ !/etc/pihole ;' /etc/tripwire/twpol.txt
fi
# ignore tt-rss cache # ignore tt-rss cache
if ! grep -q '!/etc/share/tt-rss/cache' /etc/tripwire/twpol.txt; then if ! grep -q '!/etc/share/tt-rss/cache' /etc/tripwire/twpol.txt; then
sed -i '\|/etc\t\t->.*|a\ !/etc/share/tt-rss/cache ;' /etc/tripwire/twpol.txt sed -i '\|/etc\t\t->.*|a\ !/etc/share/tt-rss/cache ;' /etc/tripwire/twpol.txt