diff options
author | a15355447898a | 2024-11-16 19:51:10 +0800 |
---|---|---|
committer | a15355447898a | 2024-11-16 19:51:10 +0800 |
commit | a5c2ebcc39e3f13784e7d3a369547f5bdf56efe0 (patch) | |
tree | e4b6fe45a53364cef34b658095de3d339f933974 | |
parent | 559a27c6674ea6197ed7ea4e04df06d5b31b9123 (diff) | |
download | aur-godns-bin.tar.gz |
添加systemd服务
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 9 | ||||
-rw-r--r-- | godns.service | 12 |
3 files changed, 21 insertions, 4 deletions
@@ -7,8 +7,10 @@ pkgbase = godns-bin license = Apache provides = godns source = godns-bin-3.1.6.tar.gz::https://github.com/TimothyYe/godns/releases/download/v3.1.6/godns_3.1.6_linux_amd64.tar.gz - source = godns.conf::https://raw.githubusercontent.com/TimothyYe/godns/v3.1.6/configs/config_sample.json + source = godns.json::https://raw.githubusercontent.com/TimothyYe/godns/v3.1.6/configs/config_sample.json + source = godns.service sha256sums = 830d12cf299acc38c19eb288abd65158bf8537a1b47a44b06053830f544966ad sha256sums = 4fa9de0eb97f6cdb0198654c60643acaa4c637637af5c0a05c9b6acd6ddfaaf7 + sha256sums = e3a93f1a4a64e6753ea36d7ee4cccdc209f4449251c6a1e6cf19b38f62bc6127 pkgname = godns-bin @@ -9,11 +9,14 @@ url='https://github.com/timothyye/godns' license=('Apache') provides=('godns') source=("${pkgname}-${pkgver}.tar.gz::https://github.com/TimothyYe/godns/releases/download/v${pkgver}/godns_${pkgver}_linux_amd64.tar.gz" - "godns.conf::https://raw.githubusercontent.com/TimothyYe/godns/v${pkgver}/configs/config_sample.json") + "godns.json::https://raw.githubusercontent.com/TimothyYe/godns/v${pkgver}/configs/config_sample.json" + "godns.service") sha256sums=('830d12cf299acc38c19eb288abd65158bf8537a1b47a44b06053830f544966ad' - '4fa9de0eb97f6cdb0198654c60643acaa4c637637af5c0a05c9b6acd6ddfaaf7') + '4fa9de0eb97f6cdb0198654c60643acaa4c637637af5c0a05c9b6acd6ddfaaf7' + 'e3a93f1a4a64e6753ea36d7ee4cccdc209f4449251c6a1e6cf19b38f62bc6127') package() { install -Dm755 "${srcdir}"/godns "${pkgdir}/usr/bin/godns" - install -Dm644 "${srcdir}"/godns.conf "${pkgdir}/etc/conf.d/godns.conf" + install -Dm644 "${srcdir}"/godns.json "${pkgdir}/etc/conf.d/godns.json" + install -Dm644 "${srcdir}"/godns.service "${pkgdir}/lib/systemd/system/godns.service" } diff --git a/godns.service b/godns.service new file mode 100644 index 000000000000..ec7edeb342dc --- /dev/null +++ b/godns.service @@ -0,0 +1,12 @@ +[Unit] +Description=GoDNS Service +After=network.target + +[Service] +ExecStart=/usr/bin/godns -c /etc/conf.d/godns.json +Restart=always +KillMode=process +RestartSec=2s + +[Install] +WantedBy=multi-user.target
\ No newline at end of file |