summarylogtreecommitdiffstats
path: root/pi-hole-server.install
blob: 8bd082324b5e9af4b5e0886b5f2472f515e45f12 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
post_install() {
  cat <<- EOF
    ==> please read configuration instructions at /usr/share/doc/pihole/configuration
    ==> ver. 2.6.3-4: lighttpd conf file is changed, please repeat the installation steps
    ==> ver.   2.7-1: lighttpd conf file is changed, please repeat the installation steps
    ==> first install/update run...
EOF
  cat /proc/net/if_inet6 2>&1 > /dev/null && touch /etc/pihole/.useIPv6
  chown -R http.http /srv/http/pihole
  systemd-tmpfiles --create pi-hole.conf
  /usr/bin/gravity.sh > /dev/null
  systemctl daemon-reload > /dev/null
  systemctl start pi-hole-gravity.timer > /dev/null
  systemctl start pi-hole-logtruncate.timer > /dev/null
}

post_upgrade() {
  [ -a /etc/pihole/hosts ] && rm /etc/pihole/hosts
  post_install $1
}

post_remove() {
  rm -R /etc/pihole/
  rm /run/log/pihole.log
}