Update: user for the coredns service

Signed-off-by: Lorenzo Fontana <lo@linux.com>
This commit is contained in:
Lorenzo Fontana
2018-04-02 13:35:32 +02:00
parent 33717982d0
commit 5080ab0759
5 changed files with 9 additions and 22 deletions

View File

@@ -8,8 +8,10 @@ pkgbase = coredns-bin
provides = coredns
source = coredns_x64_v1.1.1.tar.gz::https://github.com/coredns/coredns/releases/download/v1.1.1/coredns_1.1.1_linux_amd64.tgz
source = https://raw.githubusercontent.com/coredns/deployment/5bb111266eca2d47802e0d1a26bc55491ff2cec3/systemd/coredns.service
source = coredns-sysusers.conf
sha256sums = 6e2367879163b1c9036d5c69a121e81bad628944b9b395f49a6e45a2d9d420dd
sha256sums = be3eb5ce8740b17053aaf04ca036a4d34e0b86d0737253be7094cda16a329cf5
sha256sums = 178c632fd855a5a35ae69e13ab554d5abad696cf75d23c6b6b37f0ace3b4b0f2
pkgname = coredns-bin

1
.gitignore vendored
View File

@@ -2,3 +2,4 @@ src/
pkg/
*.tar.gz*
*.pkg.tar.*
coredns.service

View File

@@ -8,13 +8,16 @@ url="https://github.com/coredns/coredns"
license=('Apache')
provides=('coredns')
source=(coredns_x64_${pkgver}.tar.gz::https://github.com/coredns/coredns/releases/download/${pkgver}/coredns_1.1.1_linux_amd64.tgz
https://raw.githubusercontent.com/coredns/deployment/5bb111266eca2d47802e0d1a26bc55491ff2cec3/systemd/coredns.service)
https://raw.githubusercontent.com/coredns/deployment/5bb111266eca2d47802e0d1a26bc55491ff2cec3/systemd/coredns.service
coredns-sysusers.conf)
sha256sums=('6e2367879163b1c9036d5c69a121e81bad628944b9b395f49a6e45a2d9d420dd'
'be3eb5ce8740b17053aaf04ca036a4d34e0b86d0737253be7094cda16a329cf5')
'be3eb5ce8740b17053aaf04ca036a4d34e0b86d0737253be7094cda16a329cf5'
'178c632fd855a5a35ae69e13ab554d5abad696cf75d23c6b6b37f0ace3b4b0f2')
package() {
install -Dm755 "$srcdir/coredns" "$pkgdir/usr/bin/coredns"
install -Dm644 "$srcdir/coredns.service" "$pkgdir/usr/lib/systemd/system/coredns.service"
install -Dm644 "$srcdir/coredns-sysusers.conf" "$pkgdir/usr/lib/sysusers.d/coredns.conf"
install -d "${pkgdir}/etc/coredns"
}

1
coredns-sysusers.conf Normal file
View File

@@ -0,0 +1 @@
u coredns - "CoreDNS is a DNS server that chains plugins " /

View File

@@ -1,20 +0,0 @@
[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
WorkingDirectory=~
ExecStart=/usr/bin/coredns -conf=/etc/coredns/Corefile
ExecReload=/bin/kill -SIGUSR1 $MAINPID
Restart=on-failure
[Install]
WantedBy=multi-user.target