summaryrefslogtreecommitdiff
path: root/net-proxy/trojan/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-02-13 21:41:11 +0000
committerV3n3RiX <venerix@redcorelinux.org>2021-02-13 21:41:11 +0000
commitc8d60dada2ec8eb48b2d2b290cd6683ccec40e39 (patch)
treec44943ee0563a3fa957716de909fed683117fcb9 /net-proxy/trojan/files
parent69051588e2f955485fe5d45d45e616bc60a2de57 (diff)
gentoo (valentine's day) resync : 14.02.2021
Diffstat (limited to 'net-proxy/trojan/files')
-rw-r--r--net-proxy/trojan/files/README.gentoo14
-rw-r--r--net-proxy/trojan/files/trojan.initd6
2 files changed, 17 insertions, 3 deletions
diff --git a/net-proxy/trojan/files/README.gentoo b/net-proxy/trojan/files/README.gentoo
new file mode 100644
index 000000000000..caaf236f4c1c
--- /dev/null
+++ b/net-proxy/trojan/files/README.gentoo
@@ -0,0 +1,14 @@
+Notes:
+ 1) starting from version 1.16.0-r2, the daemon will
+run as user='trojan', previous it's run as user='nobody',
+you might want to fix the permissions at /etc/trojan/*.
+
+ 2) Running Trojan with multi instances
+
+ a) Using OpenRC
+ Prepare /etc/trojan/${foo}.json first
+ # ln -s /etc/init.d/trojan{,.${foo}}
+ # rc-update add trojan.${foo} default
+
+ b) Using Systemd
+ # systemctl enable trojan.${foo}
diff --git a/net-proxy/trojan/files/trojan.initd b/net-proxy/trojan/files/trojan.initd
index 348d307c5264..9c86bf704b9b 100644
--- a/net-proxy/trojan/files/trojan.initd
+++ b/net-proxy/trojan/files/trojan.initd
@@ -1,9 +1,9 @@
#!/sbin/openrc-run
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-TJ_USER=nobody
-TJ_GROUP=nobody
+TJ_USER=trojan
+TJ_GROUP=trojan
TJ_NAME=${SVCNAME##*.}
if [ -n "${TJ_NAME}" -a "${SVCNAME}" != "trojan" ]; then