瀏覽代碼

Avoid reporting pihole updates

Bob Mottram 8 年之前
父節點
當前提交
72cfef8bb7
共有 2 個文件被更改,包括 8 次插入0 次删除
  1. 5
    0
      src/freedombone-app-pihole
  2. 3
    0
      src/freedombone-base-tripwire

+ 5
- 0
src/freedombone-app-pihole 查看文件

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

+ 3
- 0
src/freedombone-base-tripwire 查看文件

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