Update start-coolq.sh

This commit is contained in:
Whale 2018-12-29 14:44:18 +08:00 committed by GitHub
parent 920cc9860e
commit 75ba912ded
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,6 +14,8 @@ if [[ ! $? -eq 0 ]]; then
reverse_url="ws://127.0.0.1:20000/"
echo "使用默认ws地址。"
fi
echo -n "请输入连接CQBot-swoole框架的token没有请回车"
read access_token
while :
do
echo -n "请输入你的酷Q下载版本 [1(CQA,默认) / 2(CQP)] : "
@ -33,12 +35,18 @@ if [[ ! $? -eq 0 ]]; then
continue
fi
done
if [[ ${access_token} = "" ]]; then
access_token2=" "
else
access_token2="-e CQHTTP_ACCESS_TOKEN="${access_token}
fi
host_mode_line="--net=host"
sudo docker run --name coolq -d -v $(pwd)/coolq-data:/home/user/coolq \
${host_mode_line} \
-e VNC_PASSWD=${vnc_pwd} \
-e CQHTTP_USE_WS_REVERSE=true \
${link} \
${access_token2} \
-e CQHTTP_WS_REVERSE_USE_UNIVERSAL_CLIENT=true \
-e CQHTTP_WS_REVERSE_URL=${reverse_url} \
-e FORCE_ENV=false \