diff options
author | Adi Prasetya | 2022-03-14 21:41:26 +0700 |
---|---|---|
committer | Adi Prasetya | 2022-03-14 21:41:26 +0700 |
commit | 00e4fb6cb88bc5f56becfbd52a325f6cf595b02a (patch) | |
tree | a5572b82a389b6bf286d7ab7bc2ab405ed748732 | |
parent | 9fc8c3a3e502a70b8c950dd1047ed5a5777ec1f6 (diff) | |
download | aur-00e4fb6cb88bc5f56becfbd52a325f6cf595b02a.tar.gz |
add another service
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | PKGBUILD | 1 | ||||
-rw-r--r-- | clash-meta-bin.install | 1 | ||||
-rw-r--r-- | clash.service | 11 |
4 files changed, 14 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore index f620840ff243..ec1c5713de95 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,5 @@ !.SRCINFO !clash@.service !clash.service +!clash_user.service !clash-meta-bin.install @@ -22,6 +22,7 @@ source_x86_64=("${pkgname}-x86_64-${pkgver}.gz::${url}/download/${pkgver}/Clash. package() { cd ${srcdir} install -Dm755 "${pkgname}-${CARCH}-${pkgver}" "${pkgdir}/usr/bin/clash" + install -Dm644 "clash.service" "${pkgdir}/usr/lib/systemd/system/clash.service" install -Dm644 "clash@.service" "${pkgdir}/usr/lib/systemd/system/clash@.service" install -Dm644 "clash_user.service" "${pkgdir}/usr/lib/systemd/user/clash.service" } diff --git a/clash-meta-bin.install b/clash-meta-bin.install index 8b2f2bea5301..00bcc303c01d 100644 --- a/clash-meta-bin.install +++ b/clash-meta-bin.install @@ -5,6 +5,7 @@ post_upgrade(){ cat << EOF This is the core of Clash Meta by MetaCubeX forked from Clash by Dreamacro. You can find the manual at https://github.com/Dreamacro/clash/wiki/configuration + Home directory clash.service at /etc/clash EOF }
\ No newline at end of file diff --git a/clash.service b/clash.service new file mode 100644 index 000000000000..237c45d27b0b --- /dev/null +++ b/clash.service @@ -0,0 +1,11 @@ +[Unit] +Description=A rule based proxy in Go. +After=network.target + +[Service] +Type=exec +Restart=on-abort +ExecStart=/usr/bin/clash -d /etc/clash + +[Install] +WantedBy=default.target |