From 75ba912dedf5ef01d5aeb66e6c1e418ffe725450 Mon Sep 17 00:00:00 2001 From: Whale Date: Sat, 29 Dec 2018 14:44:18 +0800 Subject: [PATCH] Update start-coolq.sh --- start-coolq.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/start-coolq.sh b/start-coolq.sh index 78e78659..68cdb1a5 100644 --- a/start-coolq.sh +++ b/start-coolq.sh @@ -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 \