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

View File

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