summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorYooyi2023-07-26 14:09:06 +0800
committerYooyi2023-07-26 14:09:06 +0800
commitaf53c7f0eb0c86d0e283c8cfff5f42d5524b6f14 (patch)
treed2ea5c4230cf5b469940c6afb0d594fb02309551
downloadaur-af53c7f0eb0c86d0e283c8cfff5f42d5524b6f14.tar.gz
Init
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD25
-rw-r--r--service15
3 files changed, 56 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..87807d9726f2
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = easymosdns-bin
+ pkgdesc = 基于Mosdns的精准DNS分流策略,仅需几分钟即可搭建一台支持ECS的无污染DNS服务器。
+ pkgver = 3.0
+ pkgrel = 1
+ url = https://github.com/pmkol/easymosdns
+ arch = x86_64
+ license = GPL3
+ provides = mosdns
+ source = mosdns.zip::https://github.com/IrineSistiana/mosdns/releases/download/v4.5.3/mosdns-linux-amd64.zip
+ source = config.zip::https://github.com/pmkol/easymosdns/archive/refs/tags/v3.0.zip
+ source = service
+ sha256sums = c970f5a5502256d6ef0e3b9729c325f3fca96f1bc09f0573efce9f3ee1cd67a2
+ sha256sums = 7b1062a8e9de0a93555149e042a2f410232e539b73acbaafa20bf89def9e9ec8
+ sha256sums = 5c3954d1ed479fca1dd6b9c948edd0313bd9deaafcc8e57515780bf51defff45
+
+pkgname = easymosdns
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..4f4a39b51369
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,25 @@
+pkgname=easymosdns-bin
+pkgver=3.0
+pkgrel=1
+pkgdesc="基于Mosdns的精准DNS分流策略,仅需几分钟即可搭建一台支持ECS的无污染DNS服务器。"
+arch=('x86_64')
+url="https://github.com/pmkol/easymosdns"
+license=('GPL3')
+provides=('mosdns')
+
+source=(
+ "mosdns.zip::https://github.com/IrineSistiana/mosdns/releases/download/v4.5.3/mosdns-linux-amd64.zip"
+ "config.zip::https://github.com/pmkol/easymosdns/archive/refs/tags/v3.0.zip"
+ "service"
+)
+
+sha256sums=('c970f5a5502256d6ef0e3b9729c325f3fca96f1bc09f0573efce9f3ee1cd67a2'
+ '7b1062a8e9de0a93555149e042a2f410232e539b73acbaafa20bf89def9e9ec8'
+ '5c3954d1ed479fca1dd6b9c948edd0313bd9deaafcc8e57515780bf51defff45')
+
+package() {
+ install -Dm755 mosdns "$pkgdir"/usr/bin/mosdns
+ install -dm755 "$pkgdir"/etc/mosdns
+ cp -R ${srcdir}/easymosdns-3.0/* ${pkgdir}/etc/mosdns
+ install -Dm644 service "$pkgdir"/usr/lib/systemd/system/mosdns.service
+}
diff --git a/service b/service
new file mode 100644
index 000000000000..c37233a23390
--- /dev/null
+++ b/service
@@ -0,0 +1,15 @@
+[Unit]
+Description=mosdns Service
+Documentation=https://irine-sistiana.gitbook.io/mosdns-wiki/
+After=network.target
+
+[Service]
+User=root
+Group=root
+ExecStart=/usr/bin/mosdns start -c /etc/mosdns/config.yaml -d /etc/mosdns
+Restart=on-failure
+CapabilityBoundingSet=CAP_NET_BIND_SERVICE
+AmbientCapabilities=CAP_NET_BIND_SERVICE
+
+[Install]
+WantedBy=multi-user.target