summaryrefslogtreecommitdiff
path: root/net-proxy/trojan/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-04-12 03:41:30 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-04-12 03:41:30 +0100
commit623ee73d661e5ed8475cb264511f683407d87365 (patch)
tree993eb27c93ec7a2d2d19550300d888fc1fed9e69 /net-proxy/trojan/files
parentceeeb463cc1eef97fd62eaee8bf2196ba04bc384 (diff)
gentoo Easter resync : 12.04.2020
Diffstat (limited to 'net-proxy/trojan/files')
-rw-r--r--net-proxy/trojan/files/trojan.initd15
1 files changed, 11 insertions, 4 deletions
diff --git a/net-proxy/trojan/files/trojan.initd b/net-proxy/trojan/files/trojan.initd
index cee794ad4d72..2990245430db 100644
--- a/net-proxy/trojan/files/trojan.initd
+++ b/net-proxy/trojan/files/trojan.initd
@@ -1,10 +1,17 @@
#!/sbin/openrc-run
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-TJ_CONFIG="/etc/trojan/config.json"
-TJ_PIDFILE="/run/trojan.pid"
-TJ_LOG="/var/log/trojan.log"
+TJ_NAME=${SVCNAME##*.}
+if [ -n "${TJ_NAME}" -a "${SVCNAME}" != "trojan" ]; then
+ TJ_PIDFILE="/run/trojan.${TJ_NAME}.pid"
+ TJ_CONFIG="/etc/trojan/${TJ_NAME}.json"
+ TJ_LOG="/var/log/trojan.${TJ_NAME}.log"
+else
+ TJ_PIDFILE="/run/trojan.pid"
+ TJ_CONFIG="/etc/trojan/config.json"
+ TJ_LOG="/var/log/trojan.log"
+fi
depend() {
need net