We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 68481c2 commit 3653ee2Copy full SHA for 3653ee2
trojan.sh
@@ -338,7 +338,7 @@ function info()
338
[ -z "$res" ] && status="${red}已停止${plain}" || status="${green}正在运行${plain}"
339
340
CONFIG_FILE=/usr/local/etc/trojan/config.json
341
- ip=`cat $CONFIG_FILE | grep cert | cut -d/ -f5`
+ ip=`cat $CONFIG_FILE | grep -m1 cert | cut -d/ -f5`
342
port=`cat $CONFIG_FILE | grep local_port | cut -d: -f2 | tr -d \",' '`
343
line1=`grep -n 'password' $CONFIG_FILE | head -n1 | cut -d: -f1`
344
line11=`expr $line1 + 1`
0 commit comments