void-packages

Void Source Packages
git clone git://ezup.dev/void-packages.git
Log | Files | Refs | README | LICENSE

commit 849f497b3a962dc1bf02c49b11169b0d4f4238a3
parent 7fcf9769d5b99066b5518392d8603ef1d6951995
Author: Dash Eclipse <dash@ezup.dev>
Date:   Mon, 20 Jul 2020 13:12:23 +0000

trojan: add runit service

Diffstat:
Asrcpkgs/trojan/INSTALL | 5+++++
Asrcpkgs/trojan/files/trojan/run | 2++
Msrcpkgs/trojan/template | 9++++++++-
3 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/trojan/INSTALL b/srcpkgs/trojan/INSTALL @@ -0,0 +1,5 @@ +case "${ACTION}" in +post) + setcap cap_net_bind_service,cap_net_admin+ep usr/bin/trojan + ;; +esac diff --git a/srcpkgs/trojan/files/trojan/run b/srcpkgs/trojan/files/trojan/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec chpst -u trojan:trojan trojan -c /etc/trojan/config.json 1>/dev/null diff --git a/srcpkgs/trojan/template b/srcpkgs/trojan/template @@ -1,7 +1,7 @@ # Template file for 'trojan' pkgname=trojan version=1.16.0 -revision=1 +revision=2 wrksrc="${pkgname}-${version}" build_style="cmake" configure_args="-DENABLE_MYSQL=OFF -DENABLE_SSL_KEYLOG=OFF -DENABLE_TLS13_CIPHERSUITES=OFF -DSYSTEMD_SERVICE=OFF" @@ -12,3 +12,10 @@ license="GPL-3.0-or-later" homepage="https://github.com/trojan-gfw/trojan" distfiles="${homepage}/archive/v${version}.tar.gz" checksum=86cdb2685bb03a63b62ce06545c41189952f1ec4a0cd9147450312ed70956cbc + +system_accounts="trojan" +#make_dirs="/etc/${pkgname} 0750 trojan trojan" + +post_install() { + vsv ${pkgname} +}