diff options
author | max.bra | 2016-02-03 14:25:03 +0100 |
---|---|---|
committer | max.bra | 2016-02-03 14:25:03 +0100 |
commit | f12bb9d5df7aa33caea33ad7775ada33d900122d (patch) | |
tree | cb016a1e77d58b0f71065c6f13241d853221623d | |
parent | 9255bab410056f4778faec6a6e284255c4d254cc (diff) | |
download | aur-f12bb9d5df7aa33caea33ad7775ada33d900122d.tar.gz |
ver. 2.5.1 and cron dropped
-rw-r--r-- | .SRCINFO | 27 | ||||
-rw-r--r-- | PKGBUILD | 50 | ||||
-rw-r--r-- | configuration | 3 | ||||
-rw-r--r-- | pi-hole-daily.cron | 3 | ||||
-rw-r--r-- | pi-hole-gravity.service | 9 | ||||
-rw-r--r-- | pi-hole-gravity.timer | 7 | ||||
-rw-r--r-- | pi-hole-logtruncate.service | 9 | ||||
-rw-r--r-- | pi-hole-logtruncate.timer | 7 | ||||
-rw-r--r-- | pi-hole-weekly.cron | 3 |
9 files changed, 80 insertions, 38 deletions
@@ -1,40 +1,43 @@ # Generated by mksrcinfo v8 -# Mon Feb 1 06:35:31 UTC 2016 +# Wed Feb 3 13:25:02 UTC 2016 pkgbase = pi-hole-server pkgdesc = The Pi-hole is an advertising-aware DNS/Web server. Arch adaptation for lan wide DNS server. - pkgver = 2.4 - pkgrel = 3 + pkgver = 2.5.1 + pkgrel = 1 url = https://github.com/jacobsalmela/pi-hole install = pi-hole-server.install arch = any license = GPL2 - depends = cron depends = dnsmasq depends = lighttpd depends = php-cgi depends = bc depends = figlet - conflicts = pi-hole-server - source = https://github.com/jacobsalmela/pi-hole/archive/v2.4.tar.gz + conflicts = pi-hole-standalone + source = https://github.com/pi-hole/pi-hole/archive/V2.5.1.tar.gz source = https://github.com/pi-hole/AdminLTE/archive/v1.0.0.tar.gz source = configuration source = dnsmasq.include source = dnsmasq.complete source = lighttpd.conf source = pi-hole.tmpfile - source = pi-hole-daily.cron - source = pi-hole-weekly.cron + source = pi-hole-gravity.service + source = pi-hole-gravity.timer + source = pi-hole-logtruncate.service + source = pi-hole-logtruncate.timer source = whitelist.txt source = blacklist.txt - md5sums = b051dc1bd79182262336ce8bc11fb816 + md5sums = 45cc585733b9cceb55ddf38c7c9f1066 md5sums = a2ec5ea92cce506f0fc61cc0a8f2c527 - md5sums = 77e128965dbc7e94a31a908f58a5aa6c + md5sums = 791c86996377ceca23d1459ea0fd5cd6 md5sums = fd607f890103e97e480d814a5dfbee5b md5sums = 06bb49cf66cc1db8be5e476a54b1e933 md5sums = 29aab2a7cdc82097b719935c01698777 md5sums = 564f47c5cfab0a1b7b010ddbcf8e3b84 - md5sums = 8f99cfaae99f1542788dfbd7a39b5603 - md5sums = a2d0530954e8eb19592f686e29c24c45 + md5sums = 09a4bb7aef7bbe1a1f4c6c85c1fd48b4 + md5sums = d42a864f88299998f8233c0bc0dd093d + md5sums = 0a4921a2f655c5f178460aed0d6df068 + md5sums = 291d3c95e445fe65caf40c3605efd186 md5sums = d41d8cd98f00b204e9800998ecf8427e md5sums = d41d8cd98f00b204e9800998ecf8427e @@ -2,39 +2,43 @@ pkgname=pi-hole-server _pkgname=pi-hole -pkgver=2.4 -pkgrel=3 +pkgver=2.5.1 +pkgrel=1 _wwwpkgname=AdminLTE _wwwpkgver=1.0.0 pkgdesc='The Pi-hole is an advertising-aware DNS/Web server. Arch adaptation for lan wide DNS server.' arch=('any') license=('GPL2') url="https://github.com/jacobsalmela/pi-hole" -depends=('cron' 'dnsmasq' 'lighttpd' 'php-cgi' 'bc' 'figlet') -conflicts=('pi-hole-server') +depends=('dnsmasq' 'lighttpd' 'php-cgi' 'bc' 'figlet') +conflicts=('pi-hole-standalone') install=$pkgname.install -source=(https://github.com/jacobsalmela/$_pkgname/archive/v$pkgver.tar.gz - https://github.com/pi-hole/AdminLTE/archive/v1.0.0.tar.gz +source=(https://github.com/$_pkgname/$_pkgname/archive/V$pkgver.tar.gz + https://github.com/$_pkgname/$_wwwpkgname/archive/v$_wwwpkgver.tar.gz configuration dnsmasq.include dnsmasq.complete lighttpd.conf - pi-hole.tmpfile - $_pkgname-daily.cron - $_pkgname-weekly.cron + $_pkgname.tmpfile + $_pkgname-gravity.service + $_pkgname-gravity.timer + $_pkgname-logtruncate.service + $_pkgname-logtruncate.timer whitelist.txt blacklist.txt) -md5sums=('b051dc1bd79182262336ce8bc11fb816' +md5sums=('45cc585733b9cceb55ddf38c7c9f1066' 'a2ec5ea92cce506f0fc61cc0a8f2c527' - '77e128965dbc7e94a31a908f58a5aa6c' + '791c86996377ceca23d1459ea0fd5cd6' 'fd607f890103e97e480d814a5dfbee5b' '06bb49cf66cc1db8be5e476a54b1e933' '29aab2a7cdc82097b719935c01698777' '564f47c5cfab0a1b7b010ddbcf8e3b84' - '8f99cfaae99f1542788dfbd7a39b5603' - 'a2d0530954e8eb19592f686e29c24c45' + '09a4bb7aef7bbe1a1f4c6c85c1fd48b4' + 'd42a864f88299998f8233c0bc0dd093d' + '0a4921a2f655c5f178460aed0d6df068' + '291d3c95e445fe65caf40c3605efd186' 'd41d8cd98f00b204e9800998ecf8427e' 'd41d8cd98f00b204e9800998ecf8427e') @@ -42,9 +46,10 @@ prepare() { # modify service management sed -i 's|^ \$SUDO service dnsmasq start| $SUDO systemctl start dnsmasq|' "$srcdir"/$_pkgname-$pkgver/gravity.sh + # adlists.default is already there + sed -i '/\$SUDO cp \/etc\/.pihole\/adlists.default \/etc\/pihole\/adlists.default/d' "$srcdir"/$_pkgname-$pkgver/gravity.sh + # change log location in admin php interface and scripts - sed -i 's|/var/log/pihole.log|/run/log/pihole.log|' "$srcdir"/$_wwwpkgname-$_wwwpkgver/index.php - sed -i 's|/var/log/pihole.log|/run/log/pihole.log|' "$srcdir"/$_wwwpkgname-$_wwwpkgver/api.php sed -i 's|/var/log/pihole.log|/run/log/pihole.log|' "$srcdir"/$_pkgname-$pkgver/advanced/Scripts/chronometer.sh # original toilet is in aur, enter figlet @@ -60,8 +65,8 @@ prepare() { sed -i 's|/usr/local/bin/|/usr/bin/|' "$srcdir"/$_wwwpkgname-$_wwwpkgver/api.php # since we don't directly install from git... - sed -i -e '/<b>Pi-hole Version <\/b> /,+1d' "$srcdir"/$_wwwpkgname-$_wwwpkgver/index.php - sed -i -e '/<div class="pull-right hidden-xs">/a<b>Pi-hole Version </b> '"$pkgver"'\n<b> - Web Interface Version </b>'"$_wwwpkgver"'' "$srcdir"/$_wwwpkgname-$_wwwpkgver/index.php + sed -i '/<b>Pi-hole Version <\/b> /,+1d' "$srcdir"/$_wwwpkgname-$_wwwpkgver/index.php + sed -i '/<div class="pull-right hidden-xs">/a<b>Pi-hole Version </b> '"$pkgver"'\n<b> - Web Interface Version </b>'"$_wwwpkgver"'' "$srcdir"/$_wwwpkgname-$_wwwpkgver/index.php } package() { @@ -70,12 +75,19 @@ package() { install -Dm755 ./$_pkgname-$pkgver/advanced/Scripts/chronometer.sh "$pkgdir"/usr/bin/chronometer.sh || return 1 install -Dm755 ./$_pkgname-$pkgver/advanced/Scripts/blacklist.sh "$pkgdir"/usr/bin/blacklist.sh || return 1 install -Dm755 ./$_pkgname-$pkgver/advanced/Scripts/whitelist.sh "$pkgdir"/usr/bin/whitelist.sh || return 1 - install -Dm755 $_pkgname-daily.cron "$pkgdir"/etc/cron.daily/$_pkgname-daily || return 1 - install -Dm755 $_pkgname-weekly.cron "$pkgdir"/etc/cron.weekly/$_pkgname-weekly || return 1 install -Dm644 pi-hole.tmpfile "$pkgdir"/etc/tmpfiles.d/pi-hole.conf || return 1 + install -Dm644 "$_pkgname-gravity.timer" "$pkgdir/usr/lib/systemd/system/$_pkgname-gravity.timer" + install -Dm644 "$_pkgname-gravity.service" $pkgdir/usr/lib/systemd/system/$_pkgname-gravity.service + install -Dm644 "$_pkgname-logtruncate.timer" "$pkgdir/usr/lib/systemd/system/$_pkgname-logtruncate.timer" + install -Dm644 "$_pkgname-logtruncate.service" $pkgdir/usr/lib/systemd/system/$_pkgname-logtruncate.service + install -dm755 "$pkgdir/usr/lib/systemd/system/multi-user.target.wants" + ln -s ../$_pkgname-gravity.timer "$pkgdir/usr/lib/systemd/system/multi-user.target.wants/$_pkgname-gravity.timer" + ln -s ../$_pkgname-logtruncate.timer "$pkgdir/usr/lib/systemd/system/multi-user.target.wants/$_pkgname-logtruncate.timer" + install -dm777 "$pkgdir"/etc/pihole install -dm755 "$pkgdir"/etc/pihole/configs + install -Dm644 ./$_pkgname-$pkgver/adlists.default "$pkgdir"/etc/pihole/adlists.default || return 1 install -Dm644 whitelist.txt "$pkgdir"/etc/pihole/whitelist.txt || return 1 install -Dm644 blacklist.txt "$pkgdir"/etc/pihole/blacklist.txt || return 1 install -Dm644 dnsmasq.complete "$pkgdir"/etc/pihole/configs/dnsmasq.complete || return 1 diff --git a/configuration b/configuration index 9800cb68eb20..564b45bf0fcd 100644 --- a/configuration +++ b/configuration @@ -1,8 +1,9 @@ Pi-hole Archlinux configuration instructions Server version -rev. 0.2 +rev. 0.3 Pi-Hole Web server admin page: http://<server-ip>/admin +It is possible to add custom ad-list server in /etc/pihole/adlists.list Instructions below assume ArchLinux default system config files are untouched or modified only by removing comments (#) diff --git a/pi-hole-daily.cron b/pi-hole-daily.cron deleted file mode 100644 index 1e995ded7789..000000000000 --- a/pi-hole-daily.cron +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -truncate -s 0 /run/log/pihole.log > /dev/null - diff --git a/pi-hole-gravity.service b/pi-hole-gravity.service new file mode 100644 index 000000000000..db5ba60617c4 --- /dev/null +++ b/pi-hole-gravity.service @@ -0,0 +1,9 @@ +[Unit] +Description=Ad-serving domains collector + +[Service] +Type=oneshot +ExecStart=/usr/bin/gravity.sh +Nice=19 +IOSchedulingClass=best-effort +IOSchedulingPriority=7 diff --git a/pi-hole-gravity.timer b/pi-hole-gravity.timer new file mode 100644 index 000000000000..55abd68d6afd --- /dev/null +++ b/pi-hole-gravity.timer @@ -0,0 +1,7 @@ +[Unit] +Description=Weekly ad-serving domains gathering + +[Timer] +OnCalendar=weekly +AccuracySec=3h +Persistent=true diff --git a/pi-hole-logtruncate.service b/pi-hole-logtruncate.service new file mode 100644 index 000000000000..76cd7c83068d --- /dev/null +++ b/pi-hole-logtruncate.service @@ -0,0 +1,9 @@ +[Unit] +Description=Reset dnsmasq/pi-hole query log + +[Service] +Type=oneshot +ExecStart=/usr/bin/truncate -s 0 /run/log/pihole.log +Nice=19 +IOSchedulingClass=best-effort +IOSchedulingPriority=7 diff --git a/pi-hole-logtruncate.timer b/pi-hole-logtruncate.timer new file mode 100644 index 000000000000..f676a33f1a81 --- /dev/null +++ b/pi-hole-logtruncate.timer @@ -0,0 +1,7 @@ +[Unit] +Description=Daily reset of dnsmasq/pi-hole query log + +[Timer] +OnCalendar=daily +AccuracySec=5m +Persistent=true diff --git a/pi-hole-weekly.cron b/pi-hole-weekly.cron deleted file mode 100644 index d909b7ffccd1..000000000000 --- a/pi-hole-weekly.cron +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -/usr/bin/gravity.sh > /dev/null - |