summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorFirstAirBender2020-09-15 22:40:54 -0600
committerFirstAirBender2020-09-15 22:40:54 -0600
commita35dcfd88e421aad623a77a31f542ad78a59a1d3 (patch)
treeb26418b7caa8488b4d7c0b84412a6f38a82ed754
downloadaur-a35dcfd88e421aad623a77a31f542ad78a59a1d3.tar.gz
initial commit
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD24
-rw-r--r--roothints.service9
-rw-r--r--roothints.timer13
4 files changed, 61 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..3372e1f8a909
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,15 @@
+pkgbase = unbound-root-hints
+ pkgdesc = Update root hints for unbound
+ pkgver = v1.0.0
+ pkgrel = 1
+ url = https://wiki.archlinux.org/index.php/unbound#Roothints_systemd_timer
+ arch = any
+ depends = systemd
+ optdepends = unbound
+ source = roothints.service
+ source = roothints.timer
+ sha256sums = b786d36d17b352213058b0743bc03df810348ef59b7a5c9e03d41b7804d0570b
+ sha256sums = cdbe4062d40fa21109e2d55cc6059492fb5d01b36e8c788227a4d8aca25ed0bd
+
+pkgname = unbound-root-hints
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..9382c69f4616
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,24 @@
+# Maintainer: FirstAirBender <noblechuk5 [at] web [dot] de>
+
+pkgname=unbound-root-hints
+pkgver=v1.0.0
+pkgrel=1
+pkgdesc='Update root hints for unbound'
+arch=('any')
+url='https://wiki.archlinux.org/index.php/unbound#Roothints_systemd_timer'
+optdepends=('unbound')
+depends=('systemd')
+source=(
+ "roothints.service"
+ "roothints.timer"
+)
+sha256sums=(
+ 'b786d36d17b352213058b0743bc03df810348ef59b7a5c9e03d41b7804d0570b'
+ 'a2ffa7038b3f8eb537a6fcd56ffa3f7392dbad9a8b6333edfbcc67e124320aff'
+)
+package() {
+ install --mode=755 --directory "$pkgdir/usr/lib/systemd/system"
+ install -D --mode=644 roothints.{service,timer} "$pkgdir/usr/lib/systemd/system"
+}
+
+# https://jlk.fjfi.cvut.cz/arch/manpages/man/PKGBUILD
diff --git a/roothints.service b/roothints.service
new file mode 100644
index 000000000000..83982519f7c2
--- /dev/null
+++ b/roothints.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Update root hints for unbound
+ConditionPathIsReadWrite=/etc/unbound/root.hints
+After=network.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart="/usr/bin/curl" "-o" "/etc/unbound/root.hints" "https://www.internic.net/domain/named.cache"
diff --git a/roothints.timer b/roothints.timer
new file mode 100644
index 000000000000..3e8b2327011d
--- /dev/null
+++ b/roothints.timer
@@ -0,0 +1,13 @@
+[Unit]
+Description=Update root hints for unbound
+
+# Runs on first day of every month
+[Timer]
+OnCalendar=*-*-01 12:00:00
+Persistent=yes
+RandomizedDelaySec=2s
+AccuracySec=1us
+RemainAfterElapse=no
+
+[Install]
+WantedBy=timers.target