summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLorenzo Fontana2019-02-21 17:20:22 +0100
committerLorenzo Fontana2019-02-21 17:20:56 +0100
commit78898845b751f2864cd6bbebdb50033c608c070f (patch)
treebbf4eea8d4e8361eec47c6b90ac41875d36535f1
parent4c451e66c5e86680525d67361d4142c3bbd25958 (diff)
downloadaur-78898845b751f2864cd6bbebdb50033c608c070f.tar.gz
Move systemd definitions internally
Signed-off-by: Lorenzo Fontana <lo@linux.com>
-rw-r--r--.SRCINFO8
-rw-r--r--.gitignore2
-rw-r--r--PKGBUILD8
-rw-r--r--coredns-sysusers.conf1
-rw-r--r--coredns.service19
5 files changed, 28 insertions, 10 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 3841133f9d80..65dd212bee8d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -8,11 +8,11 @@ pkgbase = coredns-bin
provides = coredns
conflicts = coredns
source = coredns_x64_1.3.1.tar.gz::https://github.com/coredns/coredns/releases/download/v1.3.1/coredns_1.3.1_linux_amd64.tgz
- source = https://raw.githubusercontent.com/coredns/deployment/39c9f7ed7640f86fa0fb6ba06a88e9afa830b306/systemd/coredns.service
- source = https://raw.githubusercontent.com/coredns/deployment/39c9f7ed7640f86fa0fb6ba06a88e9afa830b306/systemd/coredns-sysusers.conf
+ source = coredns.service
+ source = coredns-sysusers.conf
sha256sums = 1e88337650de8c878ab30a0d06adbf83c46c1cbea0d7d98f7f40c0346c39eed6
- sha256sums = 947b4838af48212ecd8e565155c97ca61ff7d408d0b8622499925b6e232656c4
- sha256sums = 178c632fd855a5a35ae69e13ab554d5abad696cf75d23c6b6b37f0ace3b4b0f2
+ sha256sums = 030cd8e938c293c11a9acdb09b138f98b37874772072336792ec4bf0d9eff9b1
+ sha256sums = 536d03f8b20b0d2d6e8f96edd7e4e4dd7f6fef39ab0e952522d8725f3cc186b7
pkgname = coredns-bin
diff --git a/.gitignore b/.gitignore
index 77e382da11c9..53aff0a6cc68 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,5 +2,3 @@ src/
pkg/
*.tar.gz*
*.pkg.tar.*
-coredns.service
-coredns-sysusers.conf
diff --git a/PKGBUILD b/PKGBUILD
index f0ee9fbe86f0..f3e201d95b02 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -9,12 +9,12 @@ url="https://github.com/coredns/coredns"
license=('Apache')
provides=('coredns')
source=(coredns_x64_${pkgver}.tar.gz::https://github.com/coredns/coredns/releases/download/v${pkgver}/coredns_${pkgver}_linux_amd64.tgz
-https://raw.githubusercontent.com/coredns/deployment/39c9f7ed7640f86fa0fb6ba06a88e9afa830b306/systemd/coredns.service
-https://raw.githubusercontent.com/coredns/deployment/39c9f7ed7640f86fa0fb6ba06a88e9afa830b306/systemd/coredns-sysusers.conf)
+coredns.service
+coredns-sysusers.conf)
sha256sums=('1e88337650de8c878ab30a0d06adbf83c46c1cbea0d7d98f7f40c0346c39eed6'
-'947b4838af48212ecd8e565155c97ca61ff7d408d0b8622499925b6e232656c4'
-'178c632fd855a5a35ae69e13ab554d5abad696cf75d23c6b6b37f0ace3b4b0f2')
+'030cd8e938c293c11a9acdb09b138f98b37874772072336792ec4bf0d9eff9b1'
+'536d03f8b20b0d2d6e8f96edd7e4e4dd7f6fef39ab0e952522d8725f3cc186b7')
package() {
install -Dm755 "$srcdir/coredns" "$pkgdir/usr/bin/coredns"
diff --git a/coredns-sysusers.conf b/coredns-sysusers.conf
new file mode 100644
index 000000000000..0a529bd05ea5
--- /dev/null
+++ b/coredns-sysusers.conf
@@ -0,0 +1 @@
+u coredns - "CoreDNS is a DNS server that chains plugins "
diff --git a/coredns.service b/coredns.service
new file mode 100644
index 000000000000..0a8c82b1eacd
--- /dev/null
+++ b/coredns.service
@@ -0,0 +1,19 @@
+[Unit]
+Description=CoreDNS DNS server
+Documentation=https://coredns.io
+After=network.target
+
+[Service]
+PermissionsStartOnly=true
+LimitNOFILE=1048576
+LimitNPROC=512
+CapabilityBoundingSet=CAP_NET_BIND_SERVICE
+AmbientCapabilities=CAP_NET_BIND_SERVICE
+NoNewPrivileges=true
+User=coredns
+ExecStart=/usr/bin/coredns -conf=/etc/coredns/Corefile
+ExecReload=/bin/kill -SIGUSR1 $MAINPID
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target