diff options
-rw-r--r-- | .SRCINFO | 14 | ||||
-rw-r--r-- | PKGBUILD | 33 | ||||
-rw-r--r-- | lighttpd.conf | 28 | ||||
-rw-r--r-- | pi-hole-server.install | 2 |
4 files changed, 57 insertions, 20 deletions
@@ -1,7 +1,7 @@ pkgbase = pi-hole-server pkgdesc = The Pi-hole is an advertising-aware DNS/Web server. Arch adaptation for lan wide DNS server. - pkgver = 2.12.1 - pkgrel = 2 + pkgver = 2.13 + pkgrel = 1 url = https://github.com/pi-hole/pi-hole install = pi-hole-server.install arch = any @@ -15,8 +15,8 @@ pkgbase = pi-hole-server conflicts = pi-hole-standalone backup = etc/pihole/whitelist.txt backup = etc/pihole/blacklist.txt - source = https://github.com/pi-hole/pi-hole/archive/v2.12.1.tar.gz - source = https://github.com/pi-hole/AdminLTE/archive/v2.4.tar.gz + source = https://github.com/pi-hole/pi-hole/archive/v2.13.tar.gz + source = https://github.com/pi-hole/AdminLTE/archive/v2.5.tar.gz source = configuration source = dnsmasq.main source = dnsmasq.include @@ -30,13 +30,13 @@ pkgbase = pi-hole-server source = whitelist.txt source = blacklist.txt source = mimic_setupVars.conf.sh - md5sums = fe6c7e1c3ae51f688574c2f3816b9e0f - md5sums = 6c05d58230a115c7facfa506e4611697 + md5sums = f0887a4604bd56842e70b9d825f81a1d + md5sums = 5af7cb8865df49943314f92defc01260 md5sums = 3acf27ca01d931db363634dbfc95a061 md5sums = 3f1aeea43af0b192edb36b9e5484ff87 md5sums = f39fa3e607ff7346e93febfa2d0e565e md5sums = 2d10140f19f54015e6ab2807267e8aaf - md5sums = 27ee227bc8143addb6e80f194fc97719 + md5sums = 9aa8a5c34b02d8d77b1d436b54695d2e md5sums = 990b8abd0bfbba23a7ce82c59f2e3d64 md5sums = 047f13d4ac97877f724f87b002aaee63 md5sums = d42a864f88299998f8233c0bc0dd093d @@ -2,10 +2,10 @@ pkgname=pi-hole-server _pkgname=pi-hole -pkgver=2.12.1 -pkgrel=2 +pkgver=2.13 +pkgrel=1 _wwwpkgname=AdminLTE -_wwwpkgver=2.4 +_wwwpkgver=2.5 pkgdesc='The Pi-hole is an advertising-aware DNS/Web server. Arch adaptation for lan wide DNS server.' arch=('any') license=('GPL2') @@ -31,13 +31,13 @@ source=(https://github.com/$_pkgname/$_pkgname/archive/v$pkgver.tar.gz blacklist.txt mimic_setupVars.conf.sh) -md5sums=('fe6c7e1c3ae51f688574c2f3816b9e0f' - '6c05d58230a115c7facfa506e4611697' +md5sums=('f0887a4604bd56842e70b9d825f81a1d' + '5af7cb8865df49943314f92defc01260' '3acf27ca01d931db363634dbfc95a061' '3f1aeea43af0b192edb36b9e5484ff87' 'f39fa3e607ff7346e93febfa2d0e565e' '2d10140f19f54015e6ab2807267e8aaf' - '27ee227bc8143addb6e80f194fc97719' + '9aa8a5c34b02d8d77b1d436b54695d2e' '990b8abd0bfbba23a7ce82c59f2e3d64' '047f13d4ac97877f724f87b002aaee63' 'd42a864f88299998f8233c0bc0dd093d' @@ -53,7 +53,7 @@ prepare() { # setting up and securing pihole wrapper script sed -n "/debugFunc() {/w $_ssc" "$srcdir"/$_pkgname-$pkgver/pihole if [ -s $_ssc ] ; then rm $_ssc ; else echo " ==> Sed error: setting up and securing pihole wrapper script 1" && return 1 ; fi - sed -i '/debugFunc() {/,+4d' "$srcdir"/$_pkgname-$pkgver/pihole + sed -i '/debugFunc() {/,+16d' "$srcdir"/$_pkgname-$pkgver/pihole sed -n "/updatePiholeFunc() {/w $_ssc" "$srcdir"/$_pkgname-$pkgver/pihole if [ -s $_ssc ] ; then rm $_ssc ; else echo " ==> Sed error: setting up and securing pihole wrapper script 2" && return 1 ; fi @@ -67,16 +67,20 @@ prepare() { if [ -s $_ssc ] ; then rm $_ssc ; else echo " ==> Sed error: setting up and securing pihole wrapper script 5" && return 1 ; fi sed -i '/uninstallFunc() {/,+4d' "$srcdir"/$_pkgname-$pkgver/pihole - sed -n "/::: \-[d,u]/w $_ssc" "$srcdir"/$_pkgname-$pkgver/pihole + sed -n "/::: \-[u,s]/w $_ssc" "$srcdir"/$_pkgname-$pkgver/pihole if [ -s $_ssc ] ; then rm $_ssc ; else echo " ==> Sed error: setting up and securing pihole wrapper script 6" && return 1 ; fi - sed -i '/::: \-[d,u,s]/d' "$srcdir"/$_pkgname-$pkgver/pihole + sed -i '/::: \-[u,s]/d' "$srcdir"/$_pkgname-$pkgver/pihole - sed -n "/\"\-[d,u,r]/w $_ssc" "$srcdir"/$_pkgname-$pkgver/pihole + sed -n "/::: \-d/w $_ssc" "$srcdir"/$_pkgname-$pkgver/pihole if [ -s $_ssc ] ; then rm $_ssc ; else echo " ==> Sed error: setting up and securing pihole wrapper script 7" && return 1 ; fi + sed -i '/::: \-d/,+3d' "$srcdir"/$_pkgname-$pkgver/pihole + + sed -n "/\"\-[d,u,r,s]/w $_ssc" "$srcdir"/$_pkgname-$pkgver/pihole + if [ -s $_ssc ] ; then rm $_ssc ; else echo " ==> Sed error: setting up and securing pihole wrapper script 8" && return 1 ; fi sed -i '/\"\-[d,u,r,s]/d' "$srcdir"/$_pkgname-$pkgver/pihole sed -n "/uninstall/w $_ssc" "$srcdir"/$_pkgname-$pkgver/pihole - if [ -s $_ssc ] ; then rm $_ssc ; else echo " ==> Sed error: setting up and securing pihole wrapper script 8" && return 1 ; fi + if [ -s $_ssc ] ; then rm $_ssc ; else echo " ==> Sed error: setting up and securing pihole wrapper script 9" && return 1 ; fi sed -i '/uninstall/d' "$srcdir"/$_pkgname-$pkgver/pihole # ----------------- @@ -117,6 +121,13 @@ prepare() { # ----------------- + # no debug for us, right now + sed -n "/\-\- Generate debug log \-\-/w $_ssc" "$srcdir"/$_wwwpkgname-$_wwwpkgver/scripts/pi-hole/php/header.php + if [ -s $_ssc ] ; then rm $_ssc ; else echo " ==> Sed error: no debug for us, right now 1" && return 1 ; fi + sed -i '/\-\- Generate debug log \-\-/,+5d' "$srcdir"/$_wwwpkgname-$_wwwpkgver/scripts/pi-hole/php/header.php + +# ----------------- + # change log location in admin php interface sed -i "s|/var/log/pihole.log|/run/log/pihole/pihole.log|w $_ssc" "$srcdir"/$_wwwpkgname-$_wwwpkgver/scripts/pi-hole/php/data.php if [ -s $_ssc ] ; then rm $_ssc ; else echo " ==> Sed error: change log location in admin php interface 1" && return 1 ; fi diff --git a/lighttpd.conf b/lighttpd.conf index 0e7094c9d278..117af109bab9 100644 --- a/lighttpd.conf +++ b/lighttpd.conf @@ -1,3 +1,22 @@ +# Pi-hole: A black hole for Internet advertisements +# (c) 2017 Pi-hole, LLC (https://pi-hole.net) +# Network-wide ad blocking via your own hardware. +# +# lighttpd config for Pi-hole +# +# This file is copyright under the latest version of the EUPL. +# Please see LICENSE file for your rights under this license. + + + +############################################################################### +# FILE AUTOMATICALLY OVERWRITTEN BY PI-HOLE INSTALL/UPDATE PROCEDURE. # +# ANY CHANGES MADE TO THIS FILE AFTER INSTALL WILL BE LOST ON THE NEXT UPDATE # +# # +# CHANGES SHOULD BE MADE IN A SEPERATE CONFIG FILE: # +# /etc/lighttpd/external.conf # +############################################################################### + server.modules = ( "mod_access", "mod_accesslog", @@ -25,7 +44,7 @@ mimetype.assign = ( fastcgi.server = ( ".php" => ( "localhost" => ( - "bin-path" => "/usr/bin/php-cgi -d open_basedir=/srv/http/pihole:/run/log/pihole:/run/pihole:/etc/pihole:/etc/hosts:/etc/hostname:/etc/dnsmasq.d/03-pihole-wildcard.conf:/proc/meminfo:/sys/class/thermal/thermal_zone0/temp -d session.save_path=/run/pihole", + "bin-path" => "/usr/bin/php-cgi -d open_basedir=/srv/http/pihole:/run/log/pihole:/run/pihole:/etc/pihole:/etc/hosts:/etc/hostname:/etc/dnsmasq.d/03-pihole-wildcard.conf:/proc/meminfo:/proc/cpuinfo:/sys/class/thermal/thermal_zone0/temp -d session.save_path=/run/pihole", "socket" => "/tmp/php-fastcgi.sock", "broken-scriptfilename" => "enable", "max-procs" => 4, @@ -67,5 +86,12 @@ $HTTP["url"] =~ "^(?!/admin)/.*" { setenv.add-response-header = ( "X-Pi-hole" => "A black hole for Internet advertisements." ) } +# Entering just "pi.hole" into a browser redirects to "pi.hole/admin/" +$HTTP["host"] == "pi.hole" { + $HTTP["url"] == "/" { + url.redirect = ( "" => "/admin/" ) + } +} + # Add user chosen options held in external file include_shell "cat external.conf 2>/dev/null" diff --git a/pi-hole-server.install b/pi-hole-server.install index c7cbfb8764eb..de21c736ca84 100644 --- a/pi-hole-server.install +++ b/pi-hole-server.install @@ -1,6 +1,6 @@ post_install() { echo -e "\e[1;33m==>\e[0m Please read configuration instructions at /usr/share/doc/pihole/configuration" - echo -e "\e[1;33m==>\e[0m \e[1;31mVer. 2.12-1\e[0m: lighttpd conf file is changed" + echo -e "\e[1;33m==>\e[0m \e[1;31mVer. 2.13-1\e[0m: lighttpd conf file is changed" echo -e "\e[1;33m==>\e[0m Please follow configuration upgrade steps" echo -e "\e[1;33m==>\e[0m Neutrino emissions detected..." touch /etc/dnsmasq.d/02-pihole-dhcp.conf |