Skip to content

Commit 3653ee2

Browse files
authored
Update trojan.sh
1 parent 68481c2 commit 3653ee2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

trojan.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ function info()
338338
[ -z "$res" ] && status="${red}已停止${plain}" || status="${green}正在运行${plain}"
339339

340340
CONFIG_FILE=/usr/local/etc/trojan/config.json
341-
ip=`cat $CONFIG_FILE | grep cert | cut -d/ -f5`
341+
ip=`cat $CONFIG_FILE | grep -m1 cert | cut -d/ -f5`
342342
port=`cat $CONFIG_FILE | grep local_port | cut -d: -f2 | tr -d \",' '`
343343
line1=`grep -n 'password' $CONFIG_FILE | head -n1 | cut -d: -f1`
344344
line11=`expr $line1 + 1`

0 commit comments

Comments
 (0)