Skip to content

Commit f37a8e1

Browse files
committed
修正vmess启动报错问题
1 parent b3b1efa commit f37a8e1

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

start.sh

+2-5
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,9 @@ checkvmessAlive(){
5555
if ps aux | grep cloud | grep -v "grep" > /dev/null ; then
5656
((c+1))
5757
fi
58-
if ps aux | grep server.js | grep -v "grep" > /dev/null ; then
59-
((c+1))
60-
fi
6158

6259
echo "c=$c"
63-
if [ $c -eq 3 ]; then
60+
if [ $c -eq 2 ]; then
6461
return 0
6562
fi
6663

@@ -177,7 +174,7 @@ createVmesConfig(){
177174
"UUID": "$uuid",
178175
"WSPATH": "$wspath",
179176
"ARGO_AUTH": "${token:-null}",
180-
"ARGO_DOMAIN": "${domain:-null}",
177+
"ARGO_DOMAIN": "${domain:-null}"
181178
}
182179
183180
EOF

vmess/start.sh

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
#!/bin/bash
22

33
# 端口参数 (必填)
4-
WEBPORT=$(jq -r ".WEBPORT" vmess.json)
54
VMPORT=$(jq -r ".VMPORT" vmess.json)
6-
export WEBPORT=$WEBPORT
75
export VMPORT=$VMPORT
86

97
# web.js 参数 (必填)
@@ -36,6 +34,10 @@ chmod +x ./entrypoint.sh
3634
./entrypoint.sh > /dev/null 2>&1
3735
mkdir -p tmp && cd tmp && wget -q https://github.com/XTLS/Xray-core/releases/latest/download/Xray-freebsd-64.zip \
3836
&& unzip Xray-freebsd-64.zip && cd .. && mv -f ./tmp/xray ./web.js && rm -rf tmp && chmod +x web.js
37+
if ps aux | grep web.js | grep -v "grep" > /dev/null; then
38+
exit 0
39+
fi
40+
3941
nohup ./web.js -c ./config.json > /dev/null 2>&1 &
4042

4143

0 commit comments

Comments
 (0)