From 623ee73d661e5ed8475cb264511f683407d87365 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 12 Apr 2020 03:41:30 +0100 Subject: gentoo Easter resync : 12.04.2020 --- net-proxy/trojan/files/trojan.initd | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'net-proxy/trojan/files') 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 -- cgit v1.2.3