diff --git a/community/unbound/PKGBUILD b/community/unbound/PKGBUILD index fd8f96219..01874ac04 100644 --- a/community/unbound/PKGBUILD +++ b/community/unbound/PKGBUILD @@ -8,7 +8,7 @@ pkgname=unbound pkgver=1.6.0 -pkgrel=1 +pkgrel=2 pkgdesc='Validating, recursive, and caching DNS resolver' url='http://unbound.net/' license=('custom:BSD') @@ -20,10 +20,12 @@ backup=('etc/unbound/unbound.conf') validpgpkeys=('EDFAA3F2CA4E6EB05681AF8E9F6F1C2D7E045F8D') source=("http://unbound.net/downloads/${pkgname}-${pkgver}.tar.gz"{,.asc} 'service' + 'hook' 'conf') sha1sums=('9b7606b016b447dc837efc108cee94f3fecf4ede' 'SKIP' - '63fcc187cec6f262d81600e66c6747285c72ad15' + 'b543ae6f8b87423bec095fca6b335a9ee43739a8' + '098d680a06e730330e3ccbdd58234d07ad1837dc' '98515708441cb831890a0b6d1986fd40649646c0') install=install @@ -54,5 +56,6 @@ package() { install -Dm644 doc/example.conf.in "${pkgdir}/etc/unbound/unbound.conf.example" install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" install -Dm644 ../service "${pkgdir}/usr/lib/systemd/system/unbound.service" + install -Dm644 ../hook "${pkgdir}/usr/share/libalpm/hooks/unbound-key.hook" install -Dm644 ../conf "${pkgdir}/etc/unbound/unbound.conf" } diff --git a/community/unbound/hook b/community/unbound/hook new file mode 100644 index 000000000..c7742cf54 --- /dev/null +++ b/community/unbound/hook @@ -0,0 +1,10 @@ +[Trigger] +Type = File +Target = /etc/trusted-key.key +Operation = Install +Operation = Upgrade + +[Action] +Description = Updating trusted-key.key for unbound... +When = PostTransaction +Exec = /bin/cp -f /etc/trusted-key.key /etc/unbound/ diff --git a/community/unbound/service b/community/unbound/service index aa92c42f0..c569602de 100644 --- a/community/unbound/service +++ b/community/unbound/service @@ -3,7 +3,6 @@ Description=Unbound DNS Resolver After=network.target [Service] -ExecStartPre=/bin/cp -f /etc/trusted-key.key /etc/unbound/ PIDFile=/run/unbound.pid ExecStart=/usr/bin/unbound -d ExecReload=/bin/kill -HUP $MAINPID