summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Lefranc2020-04-14 12:59:26 +0200
committerGuillaume Lefranc2020-04-14 12:59:26 +0200
commit7264c8008d6482174fb08ecec9ae572dcdc94137 (patch)
treee7354c40e609a024313301c54c4486320f35421c
parentcefe3046bf419759f37c96a0a7363d74c973f622 (diff)
downloadaur-7264c8008d6482174fb08ecec9ae572dcdc94137.tar.gz
Add unit file and remove install script
-rw-r--r--.SRCINFO5
-rw-r--r--PKGBUILD8
-rw-r--r--nextdns.install8
-rw-r--r--nextdns.service17
4 files changed, 24 insertions, 14 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e5de491906e4..9c924e44205b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,14 +1,15 @@
pkgbase = nextdns
pkgdesc = NextDNS DNS-over-HTTPS client
pkgver = 1.5.1
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/nextdns/nextdns
- install = nextdns.install
arch = x86_64
license = MIT
makedepends = go-pie
source = https://github.com/nextdns/nextdns/archive/v1.5.1.tar.gz
+ source = nextdns.service
sha256sums = ee0059ee0723a2755de933abc45ac0923bf473b6cb0bab66343cf3cb408a7d7f
+ sha256sums = e15d83ec460562c8a81052f37c0e78e18842e95270895524b9853f7aca285eba
pkgname = nextdns
diff --git a/PKGBUILD b/PKGBUILD
index f5af41fb0372..eda4143c0f2e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,15 +1,14 @@
# Maintainer: Guillaume Lefranc <guillaume@signal18.io>
pkgname=nextdns
pkgver=1.5.1
-pkgrel=1
+pkgrel=2
pkgdesc='NextDNS DNS-over-HTTPS client'
arch=('x86_64')
url='https://github.com/nextdns/nextdns'
license=('MIT')
makedepends=('go-pie')
-source=("$url/archive/v$pkgver.tar.gz")
+source=("$url/archive/v$pkgver.tar.gz" "nextdns.service")
sha256sums=('@checksum@')
-install=$pkgname.install
build() {
cd $pkgname-$pkgver
@@ -21,4 +20,5 @@ package() {
install -Dm755 $pkgname "$pkgdir"/usr/bin/$pkgname
}
-sha256sums=('ee0059ee0723a2755de933abc45ac0923bf473b6cb0bab66343cf3cb408a7d7f')
+sha256sums=('ee0059ee0723a2755de933abc45ac0923bf473b6cb0bab66343cf3cb408a7d7f'
+ 'e15d83ec460562c8a81052f37c0e78e18842e95270895524b9853f7aca285eba')
diff --git a/nextdns.install b/nextdns.install
deleted file mode 100644
index 49496701a51e..000000000000
--- a/nextdns.install
+++ /dev/null
@@ -1,8 +0,0 @@
-post_install() {
- /usr/bin/nextdns install
-}
-
-pre_remove() {
- systemctl stop nextdns
- /usr/bin/nextdns uninstall
-}
diff --git a/nextdns.service b/nextdns.service
new file mode 100644
index 000000000000..8c8f7400acfe
--- /dev/null
+++ b/nextdns.service
@@ -0,0 +1,17 @@
+[Unit]
+Description=NextDNS DNS53 to DoH proxy.
+ConditionFileIsExecutable=/usr/bin/nextdns
+After=network.target
+Before=nss-lookup.target
+Wants=nss-lookup.target
+
+[Service]
+StartLimitInterval=5
+StartLimitBurst=10
+Environment=SERVICE_RUN_MODE=1
+ExecStart=/usr/bin/nextdns run
+RestartSec=120
+LimitMEMLOCK=infinity
+
+[Install]
+WantedBy=multi-user.target